[sqlite] grabbing an in-memory database

2005-02-04 Thread Will Leshner
I wonder if it would be cool to be able to stream an in-memory database to a single chunk of memory, and to have SQLite initialize an in-memory database from a chunk of memory (perhaps, though, that isn't possible). That would allow you to do things like suck the entire contents of a file into

Re: [sqlite] autoincrement weirdnesses

2005-02-05 Thread Will Leshner
On Sun, 6 Feb 2005 01:17:45 -0500, Randall Randall <[EMAIL PROTECTED]> wrote: > > Okay, I know there's something obvious I must be > missing: > > sqlite> create table package (rowid integer primary key autoincrement, > name text); > SQL error: near "autoincrement": syntax error > > What am I

Re: [sqlite] What forms of comments does SQLite honor?

2005-02-09 Thread Will Leshner
On Wed, 9 Feb 2005 02:00:07 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > see whether > a /* comments to the end of text without a */ being syntactically > necessary. Not in C. The closing */ is necessary.

[sqlite] using triggers to lock records

2005-04-06 Thread Will Leshner
How feasible would it be to use triggers as a way to implement record locking in SQLite? It seems like if you create a BEFORE trigger for a particular record id and have that trigger RAISE an error for updates and deletes, you've basically locked the record. Hmm. I guess the problem is that the

[sqlite] Re: using triggers to lock records

2005-04-06 Thread Will Leshner
On Apr 6, 2005 10:43 AM, Will Leshner <[EMAIL PROTECTED]> wrote: > How feasible would it be to use triggers as a way to implement record > locking in SQLite? It seems like if you create a BEFORE trigger for a > particular record id and have that trigger RAISE an error for update

Re: [sqlite] Re: using triggers to lock records

2005-04-07 Thread Will Leshner
On Apr 7, 2005 7:44 AM, Kervin L. Pierre <[EMAIL PROTECTED]> wrote: > I know your pain :) . Finer grain locking would be > great. Yes. We may simply be trying to use SQLite for something it just wasn't designed for. On the other hand, if you are using SQLite as your single-user database, it

[sqlite] determing the primary key

2005-04-12 Thread Will Leshner
I realize that in sqlite 3, if I construct a query with 'rowid' as one of the columns, and the table I am querying explicitly declares an integer primary key column, my results have the table's name for the column and not 'rowid'. What I'm wondering is if there is a good way to determine which of

Re: [sqlite] determing the primary key

2005-04-12 Thread Will Leshner
On 4/12/05, Thomas Briggs <[EMAIL PROTECTED]> wrote: > >Aliases rowid to rowid seems to work for me, i.e. Aha. I forgot about that trick. Thanks!

Re: [sqlite] Locking Methods

2005-04-18 Thread Will Leshner
On 4/18/05, Ben Clewett <[EMAIL PROTECTED]> wrote: > I see in the manual there are plans use Row Locking. This would solve > my problems. Allowing me to load the database from multiple processes > to a far greater amount without fear of SQL_BUSY. As well as > simplifying my programs. I am

Re: [sqlite] Re: SEGV (from Perl DBI) trying to run $sth->{TYPE}->[n] on a view

2005-04-20 Thread Will Leshner
On 4/19/05, Peter Shenkin <[EMAIL PROTECTED]> wrote: > In response to Will Leshner, could you tell me how to access this > functionality from the sqlite3 shell? I'll then try it and > respond. Thanks, -P. Ah. Good point. You can't. Sorry about that. I was trying to think of a w

[sqlite] strftime and the %f option

2005-04-23 Thread Will Leshner
It would appear that for a sqlite library built with CodeWarrior on the Mac, the %f option to strftime only ever retuns '000' for the milliseconds portion of the time. I'm wondering if this could be a problem with CodeWarrior, or if that's just the way things are.

Re: [sqlite] strftime and the %f option

2005-04-23 Thread Will Leshner
On 4/22/05, Kurt Welgehausen <[EMAIL PROTECTED]> wrote: > Is that always true, or just when the date is 'now'? > I suspect that 'now' is producing an integer. Aha. I bet you are right. I wish I had thought to test that. Thanks.

Re: [sqlite] SQLite on Tiger.

2005-04-30 Thread Will Leshner
On 4/29/05, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > Tiger ships with SQLite 3.1.3 + a couple of tweaks. Specifically, > the SQLite3 on Tiger supports locking on network filesystems, > including AFP and Samba. Woohoo!

[sqlite] opening illegal database files

2005-05-07 Thread Will Leshner
It would seem that at least for some files I've tried, if a file has content but it isn't a SQLite, SQLite (3) will open the file and overwrite whatever was there. Is this the expected behavior? As a workaround, I can look for the header string, but I'd really like it if the SQLite library

Re: [sqlite] alter table rename column

2005-05-07 Thread Will Leshner
On May 7, 2005, at 3:14 PM, Kurt Welgehausen wrote: SQLite's version of the ALTER TABLE command allows the user to rename, or add a new column to, an existing table. Aha. Ok. I get it now :)

<    1   2   3