Class: Arc::DataStores::ObjectDefinitions::SqliteSchema
- Inherits:
-
Schema
- Object
- Schema
- Arc::DataStores::ObjectDefinitions::SqliteSchema
show all
- Defined in:
- lib/arc/data_stores/sqlite/object_definitions.rb
Instance Method Summary
collapse
Methods inherited from Schema
#execute_ddl, #initialize
Instance Method Details
#fetch_item(name) ⇒ Object
15
16
17
18
|
# File 'lib/arc/data_stores/sqlite/object_definitions.rb', line 15
def fetch_item name
raise "Table does not exist: #{name}" unless table_names.include? name.to_sym
SqliteTable.new name, @data_store
end
|
#fetch_keys ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/arc/data_stores/sqlite/object_definitions.rb', line 7
def fetch_keys
r = @data_store.read " SELECT name FROM sqlite_master\n WHERE type='table' AND name != 'sqlite_sequence';\n SQL\n r.map{ |t| t[:name].to_sym }\nend\n"
|