Dear SQLite developers,
I think that named table constraints is great feature of DBMS engine. It
helps users of DB to centralize business logic as close to the data as
possible.
Do you plan to include this feature in the SQLite engine in future?

Example:

create table LOG (
 ID integer primary key,
 TIME integer not null,
 TYPE integer not null,
 MSG text,

 constraint LOG_TIME_C check (TIME > 0),
 constraint LOG_TYPE_C check (TYPE between 1 and 3) -- 1 = Info, 2 = Warn, 3
= Error
);

insert into LOG values (null, 1111111111, 2, 'warning message');
- ok

insert into LOG valeus (null, 1111111111, 5, 'xyz message');
- cause error: constraint failed

-but in this case we cannot determine, wich constraint failed: LOG_TIME_C or
LOG_TYPE_C

Thank you.

Eugene Viter,
69035, Ukraine, Zaporizhye,
Titanium Institute (www.timag.org)
+380(61)2899148
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to