New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHECK constraints #115
Comments
::?CLASS.^add-constraint-check: { .birth-date < .death-date OR not .death-date.defined };Or ::?CLASS.^add-constraint-check: chk_a_b, { .birth-date < .death-date OR not .death-date.defined };Sent with GitHawk |
|
Should it warn when using a driver of database that do not support CHECK Sent with GitHawk |
|
I was going to write "or. like SQLite, accept the check definition but don't actually do the check" only to discover that it actually does, which was somewhat of a pleasant surprise. |
|
SQLite do use it? I’m surprised! :) Sent with GitHawk |
|
Apparently https://www.sqlite.org/lang_createtable.html I'm of the habit of just assuming that for most things it will accept the definition but just not do anything with it. |
|
No actually it works as it should in SQLite. In MySQL prior to 8.0 and in MariaDB prior to 10.3 (or something like that) the CHECKs are not enforced. |
The
CONSTRAINTpart is optional and is useful only to specify a name. Names are useful because they appear in error messages.The text was updated successfully, but these errors were encountered: