Skip to content

Commit

Permalink
Set a timeout in the Sqlite adapter, default to 5 seconds (Fixes #218)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Apr 28, 2008
1 parent 1fede59 commit b5ccf6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sequel_core/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
=== HEAD

* Set a timeout in the Sqlite adapter, default to 5 seconds (hrvoje.marjanovic) (#218)

* Document that calling Sequel::ODBC::Database#execute manually requires you to manually drop the returned object (jeremyevans) (#217)

* Paginating an already paginated/limited dataset now raises an error (jeremyevans)
Expand Down
1 change: 1 addition & 0 deletions sequel_core/lib/sequel_core/adapters/sqlite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def connect
@opts[:database] = ':memory:'
end
db = ::SQLite3::Database.new(@opts[:database])
db.busy_timeout(@opts.fetch(:timeout, 5000))
db.type_translation = true
# fix for timestamp translation
db.translator.add_translator("timestamp") do |t, v|
Expand Down

0 comments on commit b5ccf6e

Please sign in to comment.