Module: Sequel::JDBC::SQLite::DatabaseMethods
- Extended by:
- Database::ResetIdentifierMangling
- Includes:
- SQLite::DatabaseMethods
- Defined in:
- lib/sequel/adapters/jdbc/sqlite.rb
Overview
Instance methods for SQLite Database objects accessed via JDBC.
Constant Summary collapse
- LAST_INSERT_ROWID =
'SELECT last_insert_rowid()'.freeze
- FOREIGN_KEY_ERROR_RE =
/query does not return ResultSet/.freeze
Constants included from SQLite::DatabaseMethods
SQLite::DatabaseMethods::AUTO_VACUUM, SQLite::DatabaseMethods::PRIMARY_KEY_INDEX_RE, SQLite::DatabaseMethods::SYNCHRONOUS, SQLite::DatabaseMethods::TABLES_FILTER, SQLite::DatabaseMethods::TEMP_STORE, SQLite::DatabaseMethods::TRANSACTION_MODE, SQLite::DatabaseMethods::VIEWS_FILTER
Instance Attribute Summary
Attributes included from SQLite::DatabaseMethods
#integer_booleans, #transaction_mode, #use_timestamp_timezones
Instance Method Summary collapse
-
#foreign_key_list(table, opts = OPTS) ⇒ Object
Swallow pointless exceptions when the foreign key list pragma doesn’t return any rows.
-
#indexes(table, opts = OPTS) ⇒ Object
Swallow pointless exceptions when the index list pragma doesn’t return any rows.
Methods included from Database::ResetIdentifierMangling
Methods included from SQLite::DatabaseMethods
#auto_vacuum, #auto_vacuum=, #case_sensitive_like=, #database_type, #foreign_keys, #foreign_keys=, #pragma_get, #pragma_set, #set_integer_booleans, #sqlite_version, #supports_create_table_if_not_exists?, #supports_deferrable_foreign_key_constraints?, #supports_partial_indexes?, #supports_savepoints?, #synchronous, #synchronous=, #tables, #temp_store, #temp_store=, #use_timestamp_timezones?, #views
Instance Method Details
#foreign_key_list(table, opts = OPTS) ⇒ Object
Swallow pointless exceptions when the foreign key list pragma doesn’t return any rows.
16 17 18 19 20 21 |
# File 'lib/sequel/adapters/jdbc/sqlite.rb', line 16 def foreign_key_list(table, opts=OPTS) super rescue Sequel::DatabaseError => e raise unless e. =~ FOREIGN_KEY_ERROR_RE [] end |
#indexes(table, opts = OPTS) ⇒ Object
Swallow pointless exceptions when the index list pragma doesn’t return any rows.
25 26 27 28 29 30 |
# File 'lib/sequel/adapters/jdbc/sqlite.rb', line 25 def indexes(table, opts=OPTS) super rescue Sequel::DatabaseError => e raise unless e. =~ FOREIGN_KEY_ERROR_RE {} end |