sequel_core in the trunk now contains code for defining constraints.
here's an example:
create_table(:items) do
...
check {:price < 100}
end
you can also define named constraints:
create_table(:items) do
...
constraint(:valid_price) {:price < 100}
end
you can also pass a hash or string instead of a block:
check :price => 0..100
check 'price < 100'
check 'price < ?', 100
etc.
your comments please. Next step is to add code for adding and dropping
constraints (for databases that support these operations).
best
Sharon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---