-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 07/11/2010 10:36 PM, zeal wrote:
> how about (tableId=? or tableId=? or tableId=? or tableId=?)
> just convert IN to or.
Jay already mentioned that approach. The downside is you have to know how
big the list is in advance and construct SQL text wi
how about (tableId=? or tableId=? or tableId=? or tableId=?)
just convert IN to or.
--
From: "Roger Binns"
Sent: Monday, July 12, 2010 11:00 AM
To: "General Discussion of SQLite Database"
Subject: Re: [sqlite] binding an IN
> -BEGIN PGP SIGNE
On 12 Jul 2010, at 5:37am, raf wrote:
> Each page hit results in several database writes each of which is currently
> in a separate transaction. Is combining these into a single transaction likely
> to help or make matters worse? Or is this just an inappropriate use of sqlite?
It will probably m
On Sun, Jul 11, 2010 at 01:46:19PM -0400, Sam Carleton scratched on the wall:
> I have some audit fields, one being updatedby, I would like to create an
> update trigger that would prevent the row from being updated if this was not
> set. Can I do that in sqlite?
Define "not set." You can make
Greetings,
I've been using sqlite-3.4.2 for a customer-only website for a few years
now and the number of users has recently grown to the point where I'm now
seeing too many "database is locked(5)" (i.e. busy) errors.
When my code gets a "database is locked(5)" error, it sleeps for a random
perio
On Sun, Jul 11, 2010 at 02:15:09PM -0400, Igor Tandetnik scratched on the wall:
> Jay A. Kreibich wrote:
> > You can't add a CHECK constraint to an existing table.
>
> You should be able to do it by directly updating sqlite_master table:
>
> http://old.nabble.com/Any-workarounds-suggestions-fo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 07/11/2010 06:42 PM, Sam Carleton wrote:
> Is there any way to bind to this query?
>
> SELECT * FROM table WHERE tableId IN ( ? );
>
> Where ? should be 1,2,3,4
There is no C api that allows for binding a list so you'll have to pick an
alternativ
On Sun, Jul 11, 2010 at 07:51:18PM +, c...@comcast.net scratched on the
wall:
> Creating a new db with the added constraint is not problem for me
> at this time.
> If I wanted to allows only values "yes" or "no" or "maybe" in the
> recommendation column would I do it like this when I creat
On 12 Jul 2010, at 2:42am, Sam Carleton wrote:
> Is there any way to bind to this query?
>
> SELECT * FROM table WHERE tableId IN ( ? );
>
> Where ? should be 1,2,3,4
I think the simplest way to do that would be to use GLOB. Not very elegant but
it should work.
http://www.sqlite.org/lang_ex
On Sun, Jul 11, 2010 at 09:42:41PM -0400, Sam Carleton scratched on the wall:
> Is there any way to bind to this query?
>
> SELECT * FROM table WHERE tableId IN ( ? );
>
> Where ? should be 1,2,3,4
You can do IN ( ?, ?, ?, ? ), but I'm guessing that's not the answer
you're looking for.
Th
Is there any way to bind to this query?
SELECT * FROM table WHERE tableId IN ( ? );
Where ? should be 1,2,3,4
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Hi Jay,
Creating a new db with the added constraint is not problem for me at this
time.
If I wanted to allows only values "yes" or "no" or "maybe" in the
recommendation column would I do it like this when I created the table -
recommendation varchar(4) CHECK(recommendation='yes' |
Jay A. Kreibich wrote:
> You can't add a CHECK constraint to an existing table.
You should be able to do it by directly updating sqlite_master table:
http://old.nabble.com/Any-workarounds-suggestions-for-dropping-a-not-null-constraint--td27439289.html
It would probably be prudent to first mak
On 11 Jul 2010, at 6:46pm, Sam Carleton wrote:
> I have some audit fields, one being updatedby, I would like to create an
> update trigger that would prevent the row from being updated if this was not
> set. Can I do that in sqlite?
Use a TRIGGER on BEFORE UPDATE. In the TRIGGER check that new
I have some audit fields, one being updatedby, I would like to create an
update trigger that would prevent the row from being updated if this was not
set. Can I do that in sqlite?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:80
On Sun, Jul 11, 2010 at 09:12:09AM -0500, Jay A. Kreibich scratched on the wall:
> On Sun, Jul 11, 2010 at 01:45:50PM +, c...@comcast.net scratched on the
> wall:
>
> > I would like to restrict the values that are entered into
> > the "recommendation" column.
> >
> > How would I state that
On Sun, Jul 11, 2010 at 01:45:50PM +, c...@comcast.net scratched on the
wall:
> I would like to restrict the values that are entered into
> the "recommendation" column.
>
> How would I state that at the time I create the column in that table?
Using a CHECK constraint.
> Since that tabl
I have a table schema that looks like this:
_ID integer primary key autoincrement
name varchar(40)
category varchar(40)
recommendation varchar(40)
I would like to restrict the values that are entered into the "recommendation"
column.
How would I state that at the time I create the
Oops -- sorry guys...I got a little click-happy...not enough caffeine yet...
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sq
Version 1.44 checked in.
I also added a setDatabaseFile(char *) and getDatabaseFile() just now complete
the file name set.
cluster = new Cluster();
cluster->setDatabaseFile("cluster.db");
cluster->dbDelete();
cluster->setHistoFile("histo.csv");
cluster->setHistoSortedFile("
20 matches
Mail list logo