--- David Crawshaw <[EMAIL PROTECTED]> wrote:
>
> mbeckler <[EMAIL PROTECTED]> wrote:
> > One question though, in this patch you have "else if (colType ==
> > "FLOAT"), but from the SQLite datatype page (http://www.sqlite.org/
> > datatype3.html) it seems like the proper value there should be REAL?
>
> No, that is why I am unsatisfied with this technique. PRAGMA
> table_info() does not return the SQLite type affinity (also called a
> storage class), instead it returns the type given by the user. E.g.
>
> sqlite> CREATE TABLE myTable (col1 myBizzareType);
> sqlite> PRAGMA table_info(myTable);
> 0|col1|myBizzareType|0||0
>
> This is because SQLite is inherently typeless; it doesn't care what
> nonsense you make up as a type. What I really want is the storage
> class, which you can get from sqlite3_column_type(), but only on an
> open SELECT statement on the table in question.
That won't work either. Because it is typeless you could have N
different types for the same column for N different rows.
insert into mytable values(123);
insert into mytable values('String');
insert into mytable values(X'ABCD');
insert into mytable values(NULL); -- what's the type of NULL?
You might as well try to glean a type from myBizzareType, as it's as
good as any guess - unless you want to scan the column type for the
entire table.
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total
Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---