Re: [sqlite] I suspect not - but is the database separator configurable?

2013-02-01 Thread Mohit Sindhwani
Hi Ryan, On 2/2/2013 1:55 AM, Ryan Johnson wrote: That would break sybase, though: the quotes would also tell it to treat the db name and periods as part of the table name, too: sqlite3> create table foo(x,y); sqlite3> .tables foo sqlite3> select * from "main.foo"; Error: no such table:

[sqlite] fts4 contentless tables, multiple inserts to same doc id?

2013-02-01 Thread James Berry
Is the following intended to be legal and possible for a contentless fts table: to do multiple inserts with the same docid, but to different columns? It seems to work, and I like it, but it wasn't entirely expected. sqlite> CREATE VIRTUAL TABLE t1 USING fts4(content="", a, b); sqlite> INSERT

Re: [sqlite] I suspect not - but is the database separator configurable?

2013-02-01 Thread Ryan Johnson
On 01/02/2013 12:28 PM, Mohit Sindhwani wrote: Hi Marc, On 1/2/2013 10:42 PM, message adams wrote: My applications actually run against sybase, but I'd love to use a connection to an in-memory sqlite to carry out my testing. As part of the unit-test, I'd pass the sqlite conenction into my

Re: [sqlite] I suspect not - but is the database separator configurable?

2013-02-01 Thread Mohit Sindhwani
Hi Marc, On 1/2/2013 10:42 PM, message adams wrote: My applications actually run against sybase, but I'd love to use a connection to an in-memory sqlite to carry out my testing. As part of the unit-test, I'd pass the sqlite conenction into my source code hoping it would be none the wiser. The

Re: [sqlite] Tracking changes with sha1 hashes

2013-02-01 Thread Igor Tandetnik
On 2/1/2013 10:21 AM, Amit Chaudhuri wrote: If I only issue select queries on my two input databases, can I expect the sha1 hash to stay the same over time? Yes. You can even mark the database file as read-only and use sqlite3_open_v2 with SQLITE_OPEN_READONLY flag. -- Igor Tandetnik

Re: [sqlite] I suspect not - but is the database separator configurable?

2013-02-01 Thread Pavel Ivanov
On Fri, Feb 1, 2013 at 6:42 AM, message adams wrote: > Greetings; > > I've recently started using sqlite within Python, to help unit-test my > applications. > > My applications actually run against sybase, but I'd love to use a > connection to an in-memory sqlite to carry

[sqlite] I suspect not - but is the database separator configurable?

2013-02-01 Thread message adams
Greetings; I've recently started using sqlite within Python, to help unit-test my applications. My applications actually run against sybase, but I'd love to use a connection to an in-memory sqlite to carry out my testing. As part of the unit-test, I'd pass the sqlite conenction into my source

Re: [sqlite] Possible optimization in FTS SQLite? (abort early when unpacking docids of inverted index list)

2013-02-01 Thread Dan Kennedy
On 02/01/2013 08:31 PM, Dominique Pellé wrote: Hi I was trying to optimize this FTS query which can be a bottleneck in my application: SELECT docId,matchinfo(ftsStreets,'pcx') FROM ftsStreets WHERE ftsStreets MATCH '...' AND docId BETWEEN docid1 AND docid2; Can't SQLite optimize the query

Re: [sqlite] FTS4 languageid : not sure I understand this correctly

2013-02-01 Thread Richard Hipp
On Thu, Jan 31, 2013 at 3:18 PM, Gert Van Assche wrote: > All, > > I have the feeling this is the most stupid question ever, but... > If I create a FTS4 table, put text in it, could I use the languageid to > figure out what Language that text actually is? > Is that how langID

Re: [sqlite] Sqlite query doesn't run correctly on different databases

2013-02-01 Thread Paul Sanderson
Thanks Richard that worked On 1 February 2013 11:23, Richard Hipp wrote: > The expression "x NOT IN (something-that-contains-NULL)" is always false. > I suggest you add an additional term to the WHERE clause of the subquery: > "... AND md5 NOT NULL". > > On Fri, Feb 1, 2013

Re: [sqlite] Determine if an index has been created

2013-02-01 Thread Simon Slavin
On 1 Feb 2013, at 10:12am, Paul Sanderson wrote: > I will know the name of the index - I just need to check that it has been > created. Oh, in that case just submit the 'CREATE' command. If the index already exists you'll get an error result and nothing will be

Re: [sqlite] Sqlite query doesn't run correctly on different databases

2013-02-01 Thread Richard Hipp
The expression "x NOT IN (something-that-contains-NULL)" is always false. I suggest you add an additional term to the WHERE clause of the subquery: "... AND md5 NOT NULL". On Fri, Feb 1, 2013 at 6:20 AM, Paul Sanderson wrote: > I have a query > > SELECT * FROM

Re: [sqlite] Determine if an index has been created

2013-02-01 Thread Paul Sanderson
Thank You On 1 February 2013 10:38, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 01/02/13 02:12, Paul Sanderson wrote: > > I will know the name of the index - I just need to check that it has > > been created. > > Just use pragma

Re: [sqlite] Determine if an index has been created

2013-02-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/02/13 02:12, Paul Sanderson wrote: > I will know the name of the index - I just need to check that it has > been created. Just use pragma index_info on the index name. If it doesn't exist then you get no rows returned and if it does exist then

Re: [sqlite] Determine if an index has been created

2013-02-01 Thread Paul Sanderson
I will know the name of the index - I just need to check that it has been created. On 1 February 2013 00:09, Simon Slavin wrote: > > On 31 Jan 2013, at 10:57pm, Igor Tandetnik wrote: > > > On 1/31/2013 5:45 PM, Paul Sanderson wrote: > >> Is it

[sqlite] Peter Aronson

2013-02-01 Thread Peter Aronson
http://google.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SELECT and UPDATE in single query

2013-02-01 Thread Richard Baron Penman
> If you want to know which rows were updated regardless of the key, what > you need is a column to hold a unique value for each update transaction, > and set it as part of the UPDATE. You could add a datetime column, > for example, if the time resolution is fine enough. Good idea. I found