Jay A. Kreibich wrote: >> -----Original Message----- >> From: sqlite-users-boun...@sqlite.org >> [mailto:sqlite-users-boun...@sqlite.org] 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. > > What's stopping you from adding "OR i IS NULL" to the CHECK constraint? _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
- Re: [sqlite] Late data typing. ... Simon Slavin
- Re: [sqlite] Late data typing. ... Jens Miltner
- Re: [sqlite] Late data typing. Am I missing som... Ted Rolle
- Re: [sqlite] Late data typing. Am I missing ... Pavel Ivanov
- Re: [sqlite] Late data typing. Am I missing... Jay A. Kreibich
- Re: [sqlite] Late data typing. Am I missing... John Crenshaw
- Re: [sqlite] Late data typing. Am I missing something? O'Neill, Owen
- Re: [sqlite] Late data typing. Am I missing somethi... John Crenshaw
- Re: [sqlite] Late data typing. Am I missing som... Jay A. Kreibich
- Re: [sqlite] Late data typing. Am I missing... Dan Bishop
- Re: [sqlite] Late data typing. Am I missing somethi... Nicolas Williams
- Re: [sqlite] Late data typing. Am I missing som... John Crenshaw
- Re: [sqlite] Late data typing. Am I missing som... Jay A. Kreibich
- [sqlite] feature proposal - strong but dynamic typing Darren Duncan
- Re: [sqlite] feature proposal - strong but dynamic t... Roger Binns
- Re: [sqlite] feature proposal - strong but dynam... Darren Duncan
- Re: [sqlite] feature proposal - strong but d... Roger Binns
- Re: [sqlite] feature proposal - strong b... P Kishor
- Re: [sqlite] feature proposal - str... Doug Currie
- Re: [sqlite] feature proposal - str... Scott Hess