Method: PostgresqlWeb::Connection#columns
- Defined in:
- lib/postgresql_web/connection.rb
#columns(table_name) ⇒ Object
37 38 39 40 41 |
# File 'lib/postgresql_web/connection.rb', line 37 def columns(table_name) connection.exec("select * from INFORMATION_SCHEMA.COLUMNS where table_name = $1", [table_name]).map do |col| Column.new(col) end end |