amalgalite 0.10.1-x86-mingw32 → 0.10.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,12 +1,24 @@
1
1
  = Amalgalite Changelog
2
+ == Version 0.10.2 - 2009-08-10
3
+
4
+ === Bug Fixes
5
+
6
+ * Statement#execute was not expanding an Array passed in to the positional
7
+ #bind parameters (reported by Steven Harris).
8
+
2
9
  == Version 0.10.1 - 2009-08-01
3
10
 
11
+ === Enhancements
12
+
4
13
  * Add version subdirectory for extension on all platforms for building locally
5
14
  on gem install.
6
- * Small documentation change for Amalgalite::Database#new
7
15
  * Add gem for x86-ming32 platform
8
16
  * Add specs to validate the R*Tree index is compiled correctly
9
17
 
18
+ === Bug Fixes
19
+
20
+ * Small documentation change for Amalgalite::Database#new
21
+
10
22
  == Version 0.10.0 - 2009-06-28
11
23
 
12
24
  === Enhancements
Binary file
Binary file
@@ -145,6 +145,8 @@ module Amalgalite
145
145
 
146
146
  if params.first.instance_of?( Hash ) then
147
147
  bind_named_parameters( params.first )
148
+ elsif params.first.instance_of?( Array ) then
149
+ bind_positional_parameters( *params )
148
150
  else
149
151
  bind_positional_parameters( params )
150
152
  end
@@ -9,7 +9,7 @@ module Amalgalite
9
9
 
10
10
  MAJOR = 0
11
11
  MINOR = 10
12
- BUILD = 1
12
+ BUILD = 2
13
13
 
14
14
  #
15
15
  # return the Version as an array of MAJOR, MINOR, BUILD
@@ -95,6 +95,26 @@ describe Amalgalite::Statement do
95
95
  c.should eql(20)
96
96
  end
97
97
 
98
+ it "expands an array when binding parameters" do
99
+ @db.execute(" CREATE TABLE t(x,y); ")
100
+ values = {}
101
+ @db.prepare( "INSERT INTO t( x, y ) VALUES( ?, ? )") do |stmt|
102
+ 20.times do |x|
103
+ y = rand( x )
104
+ a = [ x, y ]
105
+ stmt.execute( a )
106
+ values[x] = y
107
+ end
108
+ end
109
+ c = 0
110
+ @db.execute("SELECT * from t") do |row|
111
+ c += 1
112
+ values[ row['x'] ].should eql(row['y'])
113
+ end
114
+ c.should eql(20)
115
+
116
+ end
117
+
98
118
  it "binds a integer variable correctly" do
99
119
  @iso_db.prepare("SELECT * FROM country WHERE id = ? ORDER BY name ") do |stmt|
100
120
  all_rows = stmt.execute( 891 )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amalgalite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Jeremy Hinegardner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-01 00:00:00 -06:00
12
+ date: 2009-08-10 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency