Skip to content

Add _columns method to Struct results. #3

@lwoodson

Description

@lwoodson
  • Currently, the struct results of a query will contain no behavior beyond having attributes matching column names.
  • It would be nice to be able to introspect a result struct for the columns/attributes it has.
    • reflective programming
    • tinkering in IRB.
  • Add a _columns method to the struct (see http://blog.rubybestpractices.com/posts/rklemme/017-Struct.html) that will return an array of column/attribute symbols in the struct.
  • Add an _attributes alias for _columns.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions