> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of O'Neill, Owen
> Sent: Wednesday, October 28, 2009 3:11 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Late data typing. Am I missing something?
>
> You can get close if you put some check constraints on the columns.
On Wed, Oct 28, 2009 at 03:24:34PM -0400, John Crenshaw scratched on the wall:
> Yeah, the code is fortunately all there, so once you know what you're
> looking for it is easy to copy out, but it should have been exposed in
> the API.
No, no... Something like this, in SQL:
CREATE TABLE t ( i INTEGER CHECK (typeof(i) = 'integer') );
This allows "strong" type checking on just the columns you care
about. Just be aware that it also prevents NULLs.
-j
--
Jay A. Kreibich < J A Y @ K R E I B I.C H >
"Our opponent is an alien starship packed with atomic bombs. We have
a protractor." "I'll go home and see if I can scrounge up a ruler
and a piece of string." --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users