Class Index [+]

Quicksearch

Sequel::JDBC::SQLite::DatabaseMethods

Instance methods for SQLite Database objects accessed via JDBC.

Constants

LAST_INSERT_ROWID
FOREIGN_KEY_ERROR_RE

Public Instance Methods

foreign_key_list(table, opts={}) click to toggle source

Swallow pointless exceptions when the foreign key list pragma doesn’t return any rows.

    # File lib/sequel/adapters/jdbc/sqlite.rb, line 15
15:         def foreign_key_list(table, opts={})
16:           super
17:         rescue Sequel::DatabaseError => e
18:           raise unless e.message =~ FOREIGN_KEY_ERROR_RE
19:           []
20:         end
indexes(table, opts={}) click to toggle source

Swallow pointless exceptions when the index list pragma doesn’t return any rows.

    # File lib/sequel/adapters/jdbc/sqlite.rb, line 24
24:         def indexes(table, opts={})
25:           super
26:         rescue Sequel::DatabaseError => e
27:           raise unless e.message =~ FOREIGN_KEY_ERROR_RE
28:           {}
29:         end

Private Instance Methods

connection_pool_default_options() click to toggle source

Default to a single connection for a memory database.

    # File lib/sequel/adapters/jdbc/sqlite.rb, line 43
43:         def connection_pool_default_options
44:           o = super
45:           uri == 'jdbc:sqlite::memory:' ? o.merge(:max_connections=>1) : o
46:         end
last_insert_id(conn, opts={}) click to toggle source

Use last_insert_rowid() to get the last inserted id.

    # File lib/sequel/adapters/jdbc/sqlite.rb, line 34
34:         def last_insert_id(conn, opts={})
35:           statement(conn) do |stmt|
36:             rs = stmt.executeQuery(LAST_INSERT_ROWID)
37:             rs.next
38:             rs.getInt(1)
39:           end
40:         end
setup_connection(conn) click to toggle source

Execute the connection pragmas on the connection.

    # File lib/sequel/adapters/jdbc/sqlite.rb, line 49
49:         def setup_connection(conn)
50:           conn = super(conn)
51:           statement(conn) do |stmt|
52:             connection_pragmas.each{|s| log_yield(s){stmt.execute(s)}}
53:           end
54:           conn
55:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.