module Sequel::JDBC::SQLite::DatabaseMethods

  1. lib/sequel/adapters/jdbc/sqlite.rb
Parent: SQLite

Instance methods for SQLite Database objects accessed via JDBC.

Methods

Public Instance

  1. foreign_key_list
  2. indexes

Constants

DATABASE_ERROR_REGEXPS = Sequel::SQLite::DatabaseMethods::DATABASE_ERROR_REGEXPS.merge(/Abort due to constraint violation/ => ConstraintViolation).freeze  
FOREIGN_KEY_ERROR_RE = /query does not return ResultSet/.freeze  
LAST_INSERT_ROWID = 'SELECT last_insert_rowid()'.freeze  

Public Instance methods

foreign_key_list (table, opts=OPTS)

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

[show source]
# File lib/sequel/adapters/jdbc/sqlite.rb, line 16
def foreign_key_list(table, opts=OPTS)
  super
rescue Sequel::DatabaseError => e
  raise unless e.message =~ FOREIGN_KEY_ERROR_RE
  []
end
indexes (table, opts=OPTS)

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

[show source]
# File lib/sequel/adapters/jdbc/sqlite.rb, line 25
def indexes(table, opts=OPTS)
  super
rescue Sequel::DatabaseError => e
  raise unless e.message =~ FOREIGN_KEY_ERROR_RE
  {}
end