aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorRobert2017-04-26 15:40:21 +0200
committerRobert2017-04-26 15:40:21 +0200
commitafc2036453c3f851ee177cfe1d54daffacdebfb0 (patch)
treebe730a37fdad1d4acc2fbe6dce357ebf94912f27 /spec/support
parentb28038e7895be940c667f2ca29cfc3212d1aba79 (diff)
downloadchouette-core-afc2036453c3f851ee177cfe1d54daffacdebfb0.tar.bz2
TODO in specs, seems I reinvented the wheel where AR already has access to the PG catalog :)
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/pg_catalog.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/pg_catalog.rb b/spec/support/pg_catalog.rb
index 30992168e..bb61adba5 100644
--- a/spec/support/pg_catalog.rb
+++ b/spec/support/pg_catalog.rb
@@ -1,5 +1,7 @@
module Support
module PGCatalog
+ # TODO: Check what of the follwowing can be done with ActiveRecord. E.g.
+ # @connection.foreign_keys(table)...
def get_columns(schema_name, table_name)
execute("SELECT * from information_schema.columns WHERE table_name = '#{table_name}' AND table_schema = '#{schema_name}'")