relevance / diametric

Diametric is a library for building schemas, queries, and transactions for Datomic from Ruby objects.
MIT License
169 stars 28 forks source link

Store attributes as a hash instead of a triplet #8

Closed avescodes closed 11 years ago

avescodes commented 11 years ago

I propose we make a simple change where attributes are stored as a hash instead of as an array of triplets.

The main purpose served here is ease of iteration of the collection of attributes and their properties. In adding :cardinality/many I'm finding the need to write really nasty code just to iterate over the set of attributes and I believe my code would be made a lot more clear by storing/accessing attributes as a hash instead of an array.

cndreisbach commented 11 years ago

I agree with this change. Thanks, Ryan!