/usr/lib/ruby/vendor_ruby/sequel/database/features.rb is in ruby-sequel 4.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | module Sequel
class Database
# ---------------------
# :section: 9 - Methods that describe what the database supports
# These methods all return booleans, with most describing whether or not the
# database supprots a given feature.
# ---------------------
# Whether the database uses a global namespace for the index. If
# false, the indexes are going to be namespaced per table.
def global_index_namespace?
true
end
# Whether the database supports CREATE TABLE IF NOT EXISTS syntax,
# false by default.
def supports_create_table_if_not_exists?
false
end
# Whether the database supports deferrable constraints, false
# by default as few databases do.
def supports_deferrable_constraints?
false
end
# Whether the database supports deferrable foreign key constraints,
# false by default as few databases do.
def supports_deferrable_foreign_key_constraints?
supports_deferrable_constraints?
end
# Whether the database supports DROP TABLE IF EXISTS syntax,
# default is the same as #supports_create_table_if_not_exists?.
def supports_drop_table_if_exists?
supports_create_table_if_not_exists?
end
# Whether the database supports Database#foreign_key_list for
# parsing foreign keys.
def supports_foreign_key_parsing?
respond_to?(:foreign_key_list)
end
# Whether the database supports Database#indexes for parsing indexes.
def supports_index_parsing?
respond_to?(:indexes)
end
# Whether the database and adapter support prepared transactions
# (two-phase commit), false by default.
def supports_prepared_transactions?
false
end
# Whether the database and adapter support savepoints, false by default.
def supports_savepoints?
false
end
# Whether the database and adapter support savepoints inside prepared transactions
# (two-phase commit), default is false.
def supports_savepoints_in_prepared_transactions?
supports_prepared_transactions? && supports_savepoints?
end
# Whether the database supports schema parsing via Database#schema.
def supports_schema_parsing?
respond_to?(:schema_parse_table, true)
end
# Whether the database supports Database#tables for getting list of tables.
def supports_table_listing?
respond_to?(:tables)
end
#
# Whether the database supports Database#views for getting list of views.
def supports_view_listing?
respond_to?(:views)
end
# Whether the database and adapter support transaction isolation levels, false by default.
def supports_transaction_isolation_levels?
false
end
# Whether DDL statements work correctly in transactions, false by default.
def supports_transactional_ddl?
false
end
private
# Whether the database supports combining multiple alter table
# operations into a single query, false by default.
def supports_combining_alter_table_ops?
false
end
# Whether the database supports CREATE OR REPLACE VIEW. If not, support
# will be emulated by dropping the view first. false by default.
def supports_create_or_replace_view?
false
end
# Whether the database supports named column constraints. True
# by default. Those that don't support named column constraints
# have to have column constraints converted to table constraints
# if the column constraints have names.
def supports_named_column_constraints?
true
end
end
end
|