Class: Arc::DataStores::ObjectDefinitions::PostgresSchema
- Inherits:
-
Schema
- Object
- Schema
- Arc::DataStores::ObjectDefinitions::PostgresSchema
show all
- Defined in:
- lib/arc/data_stores/postgres/object_definitions.rb
Instance Method Summary
collapse
Methods inherited from Schema
#execute_ddl, #initialize
Instance Method Details
#fetch_item(name) ⇒ Object
12
13
14
|
# File 'lib/arc/data_stores/postgres/object_definitions.rb', line 12
def fetch_item name
PostgresTable.new name, @data_store
end
|
#fetch_keys ⇒ Object
8
9
10
11
|
# File 'lib/arc/data_stores/postgres/object_definitions.rb', line 8
def fetch_keys
names = @data_store.read("select tablename from pg_tables where schemaname = ANY(current_schemas(false))")
names = names.to_a.map { |n| n[:tablename].to_sym }
end
|