Closed jhellerstein closed 12 years ago
Yep, this is definitely confusing. How about:
BudCollection#schema
to return key => vals
(input schema)BudCollection#cols
to return the list of column names in the collection's schema. This is nicely symmetric with the existing key_cols
and val_cols
methods.concur on the proposed solution.
Okay -- I can take a crack at implementing it.
I opened pull request #247, which should mostly take care of this issue.
Merged #247 with additional fixes -- this should be fixed.
It is handy in a
state
block to reuse the schema of a previously-defined collection, but using BudCollection#schema does not preserve the key dependencies. E.g.:The table
oops
has key[:kee, :wal]
, rather than[:kee]
. But the tableyeps
is annoying to type, so it's easy to introduce bugs by doing whatoops
does.