[sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Sergei G
I am running sqlite3 version 3.7.3 on debian. I run the following commands from fts3.html documentation page: CREATE VIRTUAL TABLE t1 USING fts4(a, b); INSERT INTO t1 VALUES('transaction default models default', 'Non transaction reads'); INSERT INTO t1 VALUES('the default transaction', 'these

[sqlite] Queries on SQLite

2012-06-14 Thread vallur raghava reddy
Hi, I have few queries on SQLite. I have listed them below, please go through them and answer. 1. Is SQLite POSIX compliant? 2. Does SQLite create a any threads? If YES, how many will be created? Previously I have sent few questions and the response was really good. I really

Re: [sqlite] sqlite sessions: handling rollbacks

2012-06-14 Thread Marco Bambini
Can you post some code or more details? Sessions has been specifically developed to handle rollbacks so your issue sounds really strange to me. -- Marco Bambini http://www.sqlabs.com On Jun 13, 2012, at 8:57 PM, Charles Samuels wrote: > > I'm using sqlite's sessions module, and I'm

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Dan Kennedy
On 06/14/2012 01:27 PM, Sergei G wrote: I am running sqlite3 version 3.7.3 on debian. I run the following commands from fts3.html documentation page: CREATE VIRTUAL TABLE t1 USING fts4(a, b); INSERT INTO t1 VALUES('transaction default models default', 'Non transaction reads'); INSERT INTO t1

Re: [sqlite] Queries on SQLite

2012-06-14 Thread Richard Hipp
On Thu, Jun 14, 2012 at 2:41 AM, vallur raghava reddy < vallur.raghavare...@gmail.com> wrote: > Hi, > I have few queries on SQLite. I have listed them below, please go > through them and answer. > > 1. Is SQLite POSIX compliant? > I'm not sure what this question is asking. SQLite works on

[sqlite] ANN: SQLite Data Wizard 12.6 released

2012-06-14 Thread SQL Maestro Group
Hi! SQL Maestro Group announces the release of SQLite Data Wizard 12.6, a powerful Windows GUI solution for SQLite data management. The new version is immediately available at http://www.sqlmaestro.com/products/sqlite/datawizard/ SQLite Data Wizard provides you with a number of easy-to-use

[sqlite] Incremental SQLite synchronization

2012-06-14 Thread Dima Bodrov
I’m considering SQLite for a multi-device mobile application. Is there anything in SQLite that allows a database on a mobile device to be synced with the master database in the cloud incrementally? Looks like iOS can do this through Core Data API. I imaging they're moving some kind of

Re: [sqlite] Incremental SQLite synchronization

2012-06-14 Thread Simon Slavin
On 13 Jun 2012, at 8:43pm, Dima Bodrov wrote: > I’m considering SQLite for a multi-device mobile application. Is there > anything in SQLite that allows a database on a mobile device to be synced > with the master database in the cloud incrementally? Looks like iOS can do >

[sqlite] Full text search without full phrase matches

2012-06-14 Thread pcarb
I had to implement something like this for comparing passages from statutes (see the Introduction in Douglas Hay and Paul Craven, *Masters, Servants and Magistrates in Britain and the Empire, 1562-1955* [UNCP Press, 2004] for an illustration). You need to isolate the keywords, in whatever

[sqlite] Full text search without full phrase matches

2012-06-14 Thread pcarb
I had to implement something like this for comparing passages from statutes (see the Introduction in Douglas Hay and Paul Craven, *Masters, Servants and Magistrates in Britain and the Empire, 1562-1955* [UNCP Press, 2004] for an illustration). You need to isolate the keywords, in whatever

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Philip Bennefall
Hi Paul, and thank you for your reply. The trouble I have is that in my query, all the keywords don't necessarily have to be present in order for a successful match to be made. SqLite's fts only seems to match if all the keywords are present, which I don't require. I am not familiar with

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Simon Slavin
On 14 Jun 2012, at 6:12pm, Philip Bennefall wrote: > The trouble I have is that in my query, all the keywords don't necessarily > have to be present in order for a successful match to be made. SqLite's fts > only seems to match if all the keywords are present, which I

[sqlite] count() problem.

2012-06-14 Thread Duquette, William H (318K)
I have a database with two tables, one of which depends on the other: CREATE TABLE a( a_id INTEGER PRIMARY KEY b_id INTEGER); CREATE TABLE c( b_id INTEGER, num INTEGER, flag INTEGER, PRIMARY KEY (b_id,num)); In words, each

Re: [sqlite] count() problem.

2012-06-14 Thread Pavel Ivanov
> SELECT a_id, count(*) > FROM a LEFT OUTER JOIN c USING (b_id) > WHERE c.flag = 1 > GROUP BY a_id > > I get a positive count if there are there are matching rows with flag = 1; > but if an a_id has no matching rows in c with flag=1, I get nothing at all.   > What I want is a row with the a_id

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Philip Bennefall
Hi Simon, That is unfortunate, if it is true that there's no way to accomplish this with SqLite. To do just plain matching I can use an unordered hash map, so I wouldn't need a database for that. The trouble with a string distance function is that I can't really process the entire dataset

Re: [sqlite] count() problem.

2012-06-14 Thread Duquette, William H (318K)
On 6/14/12 11:06 AM, "Pavel Ivanov" wrote: >> SELECT a_id, count(*) >> FROM a LEFT OUTER JOIN c USING (b_id) >> WHERE c.flag = 1 >> GROUP BY a_id >> >> I get a positive count if there are there are matching rows with flag = >>1; but if an a_id has no matching rows in c with

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Simon Slavin
On 14 Jun 2012, at 7:13pm, Philip Bennefall wrote: > That is unfortunate, if it is true that there's no way to accomplish this > with SqLite. To do just plain matching I can use an unordered hash map, so I > wouldn't need a database for that. The trouble with a string

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Philip Bennefall
Hi Simon, The ordering is not really the issue I am having. That, I can do if I just get a result back that doesn't necessarily match all the keywords. In the query you showed as an example, all the keywords would still have to match in order for a row to be returned. The sorting is a

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Simon Slavin
On 14 Jun 2012, at 7:32pm, Philip Bennefall wrote: > The problem is that it only returns a match if every single word is present. > I would like it to return matches if, say, mor than 2 or 3 of the specified > keywords are found. As far as I can figure, you need to write

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Black, Michael (IS)
Sounds to me like you want Lucene instead of SQLite http://lucene.apache.org/core/ Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems From:

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Philip Bennefall
Hi Michael, That seems to be under either gpl/lgpl/apache licenses, which I cannot use in my project for various reasons. The reason I am so interested in SqLite is because it's public domain. I appreciate the tip though. Kind regards, Philip Bennefall - Original Message - From:

Re: [sqlite] count() problem.

2012-06-14 Thread Igor Tandetnik
On 6/14/2012 2:00 PM, Duquette, William H (318K) wrote: What I want to do is find a_id's for which c contains no rows with the matching b_id in which the flag column is 1. Why don't you just say that? select a_id from a where b_id not in (select b_id from c where flag = 1); -- Igor

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Sergei G
Is there a way I can obtain documentation that matches my version? Online documentation is for the most current version. I have found that both my hosting provider and debian stable are a bit behind, so I have to work with what I've got. Thanks On Thu, Jun 14, 2012 at 1:16 AM, Dan Kennedy

Re: [sqlite] count() problem.

2012-06-14 Thread Duquette, William H (318K)
On 6/14/12 1:00 PM, "Igor Tandetnik" wrote: >On 6/14/2012 2:00 PM, Duquette, William H (318K) wrote: >> What I want to do is find a_id's for which c contains no rows with the >>matching b_id in which the flag column is 1. > >Why don't you just say that? > >select a_id from

Re: [sqlite] Full text search without full phrase matches

2012-06-14 Thread Philip Bennefall
The main issue I have is that the Apache license, as well as the gpl/lgpl licenses, force you to include the entire license with any redistribution of the software (even if it is compiled as part of a derivative work) if my understanding is correct. I am not too keen on doing that. I certainly

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Kees Nuyt
On Thu, 14 Jun 2012 13:13:58 -0700, Sergei G wrote: >Is there a way I can obtain documentation that matches my version? >Online documentation is for the most current version. >I have found that both my hosting provider and debian stable are a bit >behind, so I have to

[sqlite] (shell dependent) library rounding error

2012-06-14 Thread Etienne
Hi all, This is not really a SQLite issue, but the only solution I found out so far consists in modifying SQLite sources. Maybe someone here is able to clarify the following mystery... --- SQLite shell output: R:\>sqlite NUL "select 0.1;" 0.1 JSDB (www.jsdb.org) output: js>var db

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Kevin Benson
On Thu, Jun 14, 2012 at 4:27 PM, Kees Nuyt wrote: > On Thu, 14 Jun 2012 13:13:58 -0700, Sergei G > wrote: > > >Is there a way I can obtain documentation that matches my version? > >Online documentation is for the most current version. > >I have found

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Richard Hipp
On Thu, Jun 14, 2012 at 4:13 PM, Sergei G wrote: > Is there a way I can obtain documentation that matches my version? > Online documentation is for the most current version. > I have found that both my hosting provider and debian stable are a bit > behind, so I have to

Re: [sqlite] (shell dependent) library rounding error

2012-06-14 Thread Simon Slavin
On 14 Jun 2012, at 9:30pm, Etienne wrote: > js>var db = new SQLite(); > js>db.exec("select 0.1", function(r){writeln(r)}); > 0.1=0.11 > true There's no way to store the fraction 0.1 as a binary value. Read this:

[sqlite] Parameterized SQL

2012-06-14 Thread Udi Karni
Is there a way to run SQL scripts in the Shell with parameters? Something like this? set = 2010 SELECT COUNT (*) FROM TABLE WHERE YEAR = ; ??? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Parameterized SQL

2012-06-14 Thread Igor Tandetnik
On 6/14/2012 5:16 PM, Udi Karni wrote: Is there a way to run SQL scripts in the Shell with parameters? Something like this? set = 2010 SELECT COUNT (*) FROM TABLE WHERE YEAR = ; Not to my knowledge. -- Igor Tandetnik ___ sqlite-users mailing

[sqlite] (shell dependent) library rounding error

2012-06-14 Thread Etienne
Hi Simon, Thanks for your answer. That said... the rounding error ITSELF is not the point. The problem is: the "real" rounding error depends here on the shell (SQLite or JSDB) calling the SQLite library. If I submit twice the same input (e.g. 0.1) to the same "black box" (e.g. SQLite