Re: [sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-15 Thread Nathan Catlow
I'm back, and it's 5am, back from the dark shift :) I chose BIGINT because it matches exactly the internal represention of ROWID (from a mysql perspective, granted). but it wouldn't matter if it didn't anyway. The only adverse reaction I can see from my patch is it doesn't allow you to

Re: [sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-15 Thread Nathan Catlow
Eurika! I get it! # sqlite3 SQLite version 3.5.9 Enter ".help" for instructions sqlite> CREATE TABLE t(i INTEGER PRIMARY KEY, t TEXT); sqlite> INSERT INTO t(i,t) VALUES ("a", "b"); SQL error: datatype mismatch sqlite> CREATE TABLE t2(i INTEGER, t TEXT); sqlite> INSERT INTO t2(i,t) VALUES ("a",

Re: [sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-15 Thread Nathan Catlow
Quoting "D. Richard Hipp" <d...@hwaci.com>: > > On Dec 15, 2008, at 10:27 AM, Nathan Catlow wrote: > >> Please understand that the problem boils down to this: >> >> Why can't I CREATE TABLE t(i BIGINT PRIMARY KEY) and have it >> autoincrem

Re: [sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-15 Thread Nathan Catlow
types of Sqlite. Otherwise use Mysql or preferably PostreSQL. > > Finally, Sqlite is simple and easy to use, hence the "lite". Let it > make life easy for you and don't fight it. You will be rewarded handsomely. > > Nathan Catlow wrote: >> Quoting "John S

Re: [sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-15 Thread Nathan Catlow
Quoting "John Stanton" : > You have not grasped the fundamental concept of typing used by Sqlite. > It implements manifest typeing in the manner of scripting systems like > Javascript etc. It has a clever feature which permits you to declare a > type as anything you like

Re: [sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-15 Thread Nathan Catlow
Quoting "Jay A. Kreibich" <j...@kreibi.ch>: > On Sun, Dec 14, 2008 at 08:25:02PM +, Nathan Catlow scratched on > the wall: > >> I am trying to use libdbi + sqlite for my project. It is impossible >> for libdbi to determine the PRIMARY KEY ty

[sqlite] Impossible to declare field type BIGINT PRIMARY KEY

2008-12-14 Thread Nathan Catlow
I am trying to use libdbi + sqlite for my project. It is impossible for libdbi to determine the PRIMARY KEY type (64bit) using PRAGMA table_info(). This has completely crippled my project that relies on autoincrement. As the PRIMARY KEY is an alias to ROWID (64bit), the data should be