Parent

Files

DataMapper::Adapters::SqliteAdapter

Public Class Methods

new(name, options) click to toggle source
    # File lib/dm-sqlite-adapter/adapter.rb, line 9
 9:       def initialize(name, options)
10:         super(name, normalize_options(options))
11:       end

Public Instance Methods

normalize_options(options) click to toggle source
    # File lib/dm-sqlite-adapter/adapter.rb, line 19
19:       def normalize_options(options)
20:         # TODO Once do_sqlite3 accepts both a Pathname or a String,
21:         # normalizing database and path won't be necessary anymore
22:         # Clean out all the 'path-like' parameters in the options hash
23:         # ensuring there can only be one.
24:         # Also make sure a blank value can't possibly mask a non-blank one
25:         path = nil
26:         [:path, 'path', :database, 'database'].each do |key|
27:           db = options.delete(key)
28:           unless db.nil?
29:             normalized_db = db.to_s # no Symbol#empty? on 1.8.7(ish) rubies
30:             path ||= normalized_db unless normalized_db.empty?
31:           end
32:         end
33: 
34:         options.update(:adapter => 'sqlite3', :path => path)
35:       end
supports_subquery?(query, source_key, target_key, qualify) click to toggle source

@api private

    # File lib/dm-sqlite-adapter/adapter.rb, line 14
14:       def supports_subquery?(query, source_key, target_key, qualify)
15:         # SQLite3 cannot match a subquery against more than one column
16:         source_key.size == 1 && target_key.size == 1
17:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.