[sqlite] Unofficial poll

2012-09-23 Thread Baruch Burstein
I am curious about the usefulness of sqlite's "unique" type handling, and so would like to know if anyone has ever actually found any practical use for it/used it in some project? I am referring to the typeless handling, e.g. storing strings in integer columns etc., not to the non-truncating system

Re: [sqlite] Unofficial poll

2012-09-23 Thread Richard Hipp
On Sun, Sep 23, 2012 at 6:37 AM, Baruch Burstein wrote: > I am curious about the usefulness of sqlite's "unique" type handling, SQLite is not unique in this respect. Lots of other languages use flexible, dynamic typing: Javascript, Perl, Python, Tcl, AWK come quickly to mind. SQLite began as

Re: [sqlite] Unofficial poll

2012-09-23 Thread Baruch Burstein
On Sun, Sep 23, 2012 at 2:23 PM, Richard Hipp wrote: > On Sun, Sep 23, 2012 at 6:37 AM, Baruch Burstein >wrote: > > > I am curious about the usefulness of sqlite's "unique" type handling, > > > SQLite is not unique in this respect. Lots of other languages use > flexible, dynamic typing: Javasc

Re: [sqlite] Unofficial poll

2012-09-23 Thread Simon Slavin
On 23 Sep 2012, at 11:37am, Baruch Burstein wrote: > I am curious about the usefulness of sqlite's "unique" type handling, and > so would like to know if anyone has ever actually found any practical use > for it/used it in some project? I am referring to the typeless handling, I use it in a pro

Re: [sqlite] Unofficial poll

2012-09-23 Thread Jim Dodgen
I program mostly on Perl on Linux and it is a beautiful fit. Example is I can have a date field with a POSIX time value (or offset) in it or another date related value like "unknown" On Sun, Sep 23, 2012 at 3:37 AM, Baruch Burstein wrote: > > I am curious about the usefulness of sqlite's "uniqu

Re: [sqlite] Unofficial poll

2012-09-23 Thread Yuriy Kaminskiy
Jim Dodgen wrote: > On Sun, Sep 23, 2012 at 3:37 AM, Baruch Burstein wrote: >> I am curious about the usefulness of sqlite's "unique" type handling, and >> so would like to know if anyone has ever actually found any practical use >> for it/used it in some project? I am referring to the typeless ha

Re: [sqlite] Unofficial poll

2012-09-23 Thread Jim Dodgen
On Sun, Sep 23, 2012 at 10:25 AM, Yuriy Kaminskiy wrote: > Jim Dodgen wrote: >> I program mostly on Perl on Linux and it is a beautiful fit. Example >> is I can have a date field with a POSIX time value (or offset) in it >> or another date related value like "unknown" > > Very bad example. Standa

Re: [sqlite] Unofficial poll

2012-09-23 Thread Alek Paunov
On 23.09.2012 13:37, Baruch Burstein wrote: Has anyone ever actually taken advantage of this feature? In what case? Yes, This feature is very useful for storing hierarchical data - XML, JSON, ASTs, objects in the script engines (e.g. Lua, Python, ...), etc. IMHO, If the understanding of the u

Re: [sqlite] Unofficial poll

2012-09-23 Thread Simon Slavin
On 23 Sep 2012, at 9:55pm, Alek Paunov wrote: > This feature is very useful for storing hierarchical data - XML, JSON, ASTs, > objects in the script engines (e.g. Lua, Python, ...), etc. Really ? I don't know about ASTs, but aren't XML and JSON encodings just strings ? You could encode anyt

Re: [sqlite] Unofficial poll

2012-09-23 Thread Alek Paunov
On 23.09.2012 23:59, Simon Slavin wrote: On 23 Sep 2012, at 9:55pm, Alek Paunov wrote: This feature is very useful for storing hierarchical data - XML, JSON, ASTs, objects in the script engines (e.g. Lua, Python, ...), etc. Really ? I don't know about ASTs, but aren't XML and JSON encodings

Re: [sqlite] Unofficial poll

2012-09-23 Thread Paul van Helden
I am using this feature a lot. My applications log all changes to the database, SQL and parameters. So I have an attached log.db with a field for the SQL and then 32 typeless columns for the parameters. Works like a charm! On Sun, Sep 23, 2012 at 12:37 PM, Baruch Burstein wrote: > I am curious ab

Re: [sqlite] Unofficial poll

2012-09-24 Thread Eleytherios Stamatogiannakis
Sqlite's dynamic typing made it a natural fit for using it with Python UDFs in madIS: https://code.google.com/p/madis/ Absence of the feature would have complicated the whole "functional relational" [*] workflow that madIS uses a *lot*. l. [*] Instead of Python functions calling SQL, have S

Re: [sqlite] Unofficial poll

2012-09-24 Thread monari.ad...@juno.com
My thoughts follow: Be lenient in what you accept; be stringent in what you produce. I believe SQLite follows this principle. Frank. Richard Hipp wrote: On Sun, Sep 23, 2012 at 6:37 AM, Baruch Burstein wrote: I am curious about the usefulness of sqlite's "unique" type handling, SQLite i

Re: [sqlite] Unofficial poll

2012-09-24 Thread Jay A. Kreibich
On Sun, Sep 23, 2012 at 01:37:59PM +0300, Baruch Burstein scratched on the wall: > I am curious about the usefulness of sqlite's "unique" type handling, and > so would like to know if anyone has ever actually found any practical use > for it/used it in some project? I am referring to the typeless h

Re: [sqlite] Unofficial poll

2012-09-24 Thread Jay A. Kreibich
On Sun, Sep 23, 2012 at 09:25:06PM +0400, Yuriy Kaminskiy scratched on the wall: > Jim Dodgen wrote: > > I program mostly on Perl on Linux and it is a beautiful fit. Example > > is I can have a date field with a POSIX time value (or offset) in it > > or another date related value like "unknown" >

Re: [sqlite] Unofficial poll

2012-09-24 Thread Yuriy Kaminskiy
Jay A. Kreibich wrote: > On Sun, Sep 23, 2012 at 09:25:06PM +0400, Yuriy Kaminskiy scratched on the > wall: >> Jim Dodgen wrote: > >>> I program mostly on Perl on Linux and it is a beautiful fit. Example >>> is I can have a date field with a POSIX time value (or offset) in it >>> or another date

Re: [sqlite] Unofficial poll

2012-09-24 Thread Petite Abeille
On Sep 23, 2012, at 12:37 PM, Baruch Burstein wrote: > I am curious about the usefulness of sqlite's "unique" type handling, and > so would like to know if anyone has ever actually found any practical use > for it/used it in some project? I am referring to the typeless handling, > e.g. storing s

Re: [sqlite] Unofficial poll

2012-09-24 Thread Jay A. Kreibich
On Mon, Sep 24, 2012 at 09:05:51PM +0400, Yuriy Kaminskiy scratched on the wall: > Jay A. Kreibich wrote: > > And finally, for anyone that really wants strong typing, that's easy > > enough to do. Just add a check constraint to your column defs: > > > > CREATE TABLE t ( > > i intege

Re: [sqlite] Unofficial poll

2012-10-08 Thread Yves Goergen
On 23.09.2012 12:37 CE(S)T, Baruch Burstein wrote: > Has anyone ever actually taken advantage of this feature? In what case? No. And I guess I wouldn't need it. If I need that in other systems, I simply use the most generic type, varchar/text or blob. This way, at least it's obvious that text can

Re: [sqlite] sqlite Unofficial poll

2012-09-23 Thread Tim Streater
On 23 Sep 2012 at 11:37, Baruch Burstein wrote: > I am curious about the usefulness of sqlite's "unique" type handling, and > so would like to know if anyone has ever actually found any practical use > for it/used it in some project? I am referring to the typeless handling, > e.g. storing strings