Module: Sequel::Extension::PgComment::DatasetMethods
- Defined in:
- lib/sequel/extensions/pg_comment/dataset_methods.rb
Overview
Support for retrieving column comments from a PostgreSQL database via a dataset. For example:
DB[:foo_tbl].comment_for(:some_column)
Will retrieve the comment for foo_tbl.some_column, if such a
column exists.
Instance Method Summary collapse
-
#comment_for(col) ⇒ String, NilClass
Retrieve the comment for the column named
colin the "primary" table for this dataset.
Instance Method Details
#comment_for(col) ⇒ String, NilClass
Retrieve the comment for the column named col in the "primary" table
for this dataset.
19 20 21 |
# File 'lib/sequel/extensions/pg_comment/dataset_methods.rb', line 19 def comment_for(col) db.comment_for("#{first_source_table}__#{col}") end |