spider-gazelle / rethinkdb-orm

RethinkDB ORM for Crystal lang
MIT License
24 stars 0 forks source link

Configurable primary_key #3

Open caspiano opened 4 years ago

caspiano commented 4 years ago
# usage
class Model < RethinkORM::Base
  primary_key hash
  attribute hash : String
end

This will require configuring the table with the desired primary_key on startup. We'll also need a validator to ensure that key lengths are less than 127 chars (a RethinkDB system limit).

We'll also need to update queries to use the primary key by default.