[sqlite] More problems with fts1

2006-10-14 Thread Eric Bohlman

The following query

  SELECT title,snippet(stories,"~","~","...")
  FROM titles JOIN stories ON titles.story_id=stories.rowid
  WHERE stories.body MATCH ?

results in a complaint that MATCH is being called in the wrong context. 
Prefixing any/all column names with "+" doesn't change this.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] feature enhancement: extending rowid

2006-10-14 Thread Will Leshner

On 10/13/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote:


Having a builtin function that returns the row number of the row in
the result set would be useful for some of the things I'm doing. Rowid
is close, but not won't work in my application.


What would the "row number" represent?

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Question - Multiple Users, Multiple files

2006-10-14 Thread John Stanton
I would judge that your proposed application is an ideal one for Sqlite. 
 It should work very well, and you should be able to support a large 
number of simultaneous users.


Jason Abayomi wrote:

Thanks guys for all the replies I appreciate it.

I'm leaning more and more towards using sqlite after your comments for 
these

reasons.

1. Each user will have his/her own database and so will likely only be
accessed at any one time by one user.  To reduce concurrency issues as well
as for better application design. It is unlikely that there will be cross
user access.

2.  Aside from the initial shema design, most operations from users will be
read and update operations, I don't forsee too many create table statements
very often.

3.  There is in my opinion a similar overhead with doing operations on
in-memory xml data

I considered using a good ol client server setup like mysql or postgre/sql
and didn't think it better to have instead a database with thousands of
tables, each created per user with some of the users having more than one
table by the way.

I'm always open for more suggestions.


On 10/13/06, John Stanton <[EMAIL PROTECTED]> wrote:



Jason Abayomi wrote:
> Sorry about the previous mail, I hit tab in a gmail and it 
automatically

> sent it.
>
> Anyway, back to my question
> I'm planning out a program right now - web based - that would require
each
> user of the application to be able to create their own independent data
> store with its own schema and modifications etc.  In a perfect world,
> sqlite
> would be great for this as I could just give each individual user their
own
> sqlite database and let them manipulate tables and schema as they see
fit
> before they start to store information into the db.
>
> My concern is scalability and the performance hit of having let's say
5000
> users potentially, accessing 5000 databases at the same time on the
server.
> Based on my readings around the web there are ways to optimize sql
queries
> (transactions, in memory dbs and all that) but even with that, would it
be
> feasible or better yet advisable?
>
> The main issue here is the ability of the users to create and modify
their
> own schemas which may leave my only other option to be xml
>
> Thanks.
>
> Jason
>
With Sqlite that is basically only 5,000 files.  not a giant load on
your server.


- 


To unsubscribe, send email to [EMAIL PROTECTED]

- 









-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Error retrieving FTS1 offsets for single MATCH only

2006-10-14 Thread drh
Ralf Junker <[EMAIL PROTECTED]> wrote:
> I want to use this SQL query to retrieve the offsets information for a single 
> FTS1 result:
> 
>   select rowid, offsets (x) from x where Content match 'search' and rowid = 1;
> 
> Surprisingly, the query fails due to
> 
>   Error 1: unable to use function MATCH in the requested context.
> 
> It seems that MATCH can not be combined with other conditions in a WHERE 
> clause. I then tried the query as a subquery, but this also  produces the 
> same error.
> 
> Is there a workaround? 

Make the second term:  +rowid=1

That is to say, put a unary "+" in front of the "rowid".

The behavior you have discovered is a well-known issue to the
developers. I'm hoping to fix it in a future version.

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Error retrieving FTS1 offsets for single MATCH only

2006-10-14 Thread Ralf Junker
I want to use this SQL query to retrieve the offsets information for a single 
FTS1 result:

  select rowid, offsets (x) from x where Content match 'search' and rowid = 1;

Surprisingly, the query fails due to

  Error 1: unable to use function MATCH in the requested context.

It seems that MATCH can not be combined with other conditions in a WHERE 
clause. I then tried the query as a subquery, but this also  produces the same 
error.

Is there a workaround? I would prefer not to store all offsets from all results 
in order to keep memory requirements low.

Thanks for any suggestion,

Ralf


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] documentation on the webserver

2006-10-14 Thread Peter Cunderlik




Can you possibly put a version specific copy of the API reference up
instead of just
a single page?   Each time you change it just clone the page and
change the new page
instead.


AFAIK the docs online are the ones for the most recent version of
SQLite. The 3.1.14 docs should be in the 3.1.14 source tarball, in the
www directory (you have to run make doc, or something like that.)

Peter

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] (Virtual Tables) xFilter - called only once per xOpen ?

2006-10-14 Thread drh
"Michael Brehm" <[EMAIL PROTECTED]> wrote:
> Hi again, still working on my Virtual Table implementation/object model
> here, and I have a question about the relationship between xOpen and
> xFilter.  By perusing the code and playing around with some sample
> statements, it looks to me like there will only be one call to xFilter for
> any given cursor instance.  Is this a fact I can count on, 

No.  You can get xFilter to be called multiple times by using
it in a join.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] documentation on the webserver

2006-10-14 Thread Gunnar Roth


Am 14.10.2006 um 04:40 schrieb Jay Sprenkle:


The problem is that the function:  less_goofy_sqlite3_step();   does
not exist in version 3.1.14.
Nor does the function:  sqlite3_extended_result_codes() ;


Mybe you should clean your glasses ;-)
the less_goofy_sqlite3_step() function is printed in the doc right in  
the sqlite3_step() topic.


and there is this sentence:
In an effort to address this, newer versions of SQLite (version 3.3.8  
and later) include support for additional result codes that provide  
more detailed information about errors. The extended result codes are  
enabled (or disabled) for each database connection using the  
sqlite3_extended_result_codes() API.


please notice the version 3.3.8 or later statement.

regards
gunnar