diff options
| author | Rob Holland <rob@inversepath.com> | 2008-05-12 09:31:30 +0100 |
|---|---|---|
| committer | Rob Holland <rob@inversepath.com> | 2008-05-12 09:31:30 +0100 |
| commit | 2198de6b7f2aa6ef6dc135877fc9d179e5739225 (patch) | |
| tree | 5f999d3d2a308a08a43af6dd5176df81f302c3b0 /lib/sqlite3 | |
| parent | f41134d86c76e8ef37b877df7989d02ec579305a (diff) | |
| download | third_party-sqlite3-ruby-2198de6b7f2aa6ef6dc135877fc9d179e5739225.tar.gz third_party-sqlite3-ruby-2198de6b7f2aa6ef6dc135877fc9d179e5739225.tar.xz third_party-sqlite3-ruby-2198de6b7f2aa6ef6dc135877fc9d179e5739225.zip | |
Use int_bind64 on Fixnum values larger than a 32bit C int can take.
Diffstat (limited to 'lib/sqlite3')
| -rw-r--r-- | lib/sqlite3/statement.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlite3/statement.rb b/lib/sqlite3/statement.rb index a78cc11..eeca6a2 100644 --- a/lib/sqlite3/statement.rb +++ b/lib/sqlite3/statement.rb @@ -90,7 +90,11 @@ module SQLite3 when Bignum then @driver.bind_int64( @handle, param, value ) when Integer then - @driver.bind_int( @handle, param, value ) + if value >= (2 ** 31) + @driver.bind_int64( @handle, param, value ) + else + @driver.bind_int( @handle, param, value ) + end when Numeric then @driver.bind_double( @handle, param, value.to_f ) when Blob then |
