lib/dm-sqlite-adapter/adapter.rb in dm-sqlite-adapter-1.0.0.rc2 vs lib/dm-sqlite-adapter/adapter.rb in dm-sqlite-adapter-1.0.0.rc3
- old
+ new
@@ -4,13 +4,21 @@
module DataMapper
module Adapters
class SqliteAdapter < DataObjectsAdapter
+ def initialize(name, options)
+ super(name, normalize_options(options))
+ end
+
# @api private
def supports_subquery?(query, source_key, target_key, qualify)
# SQLite3 cannot match a subquery against more than one column
source_key.size == 1 && target_key.size == 1
+ end
+
+ def normalize_options(options)
+ options.update(:adapter => 'sqlite3')
end
end
const_added(:SqliteAdapter)