[sqlite] System.Data.SQLite and Shared Cache

2011-07-20 Thread Samuel Neff
Can the System.Data.SQLite provider add support for Shared Cache? There's some old code in interop.c that's commented out that enables it, but no indication of why it's commented out. There's some discussion of it from five years ago here, with a patch to add support: http://sqlite.phxsoftware.co

Re: [sqlite] Understanding table-level locking in shared-cache mode

2011-07-20 Thread Samuel Neff
Oracle's distribution of BerkleyDB with SQLite has page-level locking instead of database-level locking. If you need the increased concurrency that is an option. http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html Supposedly it's a drop-in replacement for sqlite. I haven't

Re: [sqlite] [FTS3] The Compress and Uncompress functions

2011-07-20 Thread Abhinav Upadhyay
On Wed, Jul 20, 2011 at 7:51 PM, Abhinav Upadhyay wrote: > Hi, > > I have an FTS table with compress and uncompress options enabled. I am > using zlib(3) for doing the compression. The compression function > seems to be doing ok as I can see the size of the database coming down > drastically. But

Re: [sqlite] "override" table?

2011-07-20 Thread Simon Slavin
On 20 Jul 2011, at 7:23pm, Jonas Sandman wrote: > sqlite> select ifnull(nullif(s.value, r.value), r.value) as value FROM real r > LEFT OUTER JOIN shadow s ON s.id=r.id; > 1 > 22 > 3 > 4 > > Or am I misunderstanding? That looks fine. And if he uses that SELECT to make a VIEW he can treat the

Re: [sqlite] "override" table?

2011-07-20 Thread Jonas Sandman
Don't you simply want this? sqlite> create table real (id integer primary key, value integer); sqlite> create table shadow (id integer primary key, value integer); sqlite> insert into real (id, value) VALUES (1, 1); sqlite> insert into real (id, value) VALUES (2, 2); sqlite> insert into real (id,

Re: [sqlite] "override" table?

2011-07-20 Thread Jonas Sandman
Don't you simply want this? sqlite> create table real (id integer primary key, value integer); sqlite> create table shadow (id integer primary key, value integer); sqlite> insert into real (id, value) VALUES (1, 1); sqlite> insert into real (id, value) VALUES (2, 2); sqlite> insert into real (id,

Re: [sqlite] "override" table?

2011-07-20 Thread morning5591
Igor, Good point. That's certainly the most straightforward way, which is a benefit in itself. Sometimes when you have a really good hammer everything starts looking like a nail. Thanks to all! Keith On Jul 20, 2011 2:03pm, Igor Tandetnik wrote: > On 7/20/2011 11:21 AM, KeithB wrote: > >

Re: [sqlite] "override" table?

2011-07-20 Thread Igor Tandetnik
On 7/20/2011 11:21 AM, KeithB wrote: > I'd like to create a temporary table to "shadow" one of my persistent > tables. It will have the same columns and hold "override" values that, > when present, take precedence over the real values. So, I'd like to > search for a row by primary key, looking firs

Re: [sqlite] "override" table?

2011-07-20 Thread Jim Morris
A union variation that is more amenable to generic selects: select a,b,c,1 as tablename from real where id=123 and not exists (Select 1 from over where over.id = real.id) union select a,b,c,2 as tablename from over where id=123 ___ sqlite-users maili

Re: [sqlite] "override" table?

2011-07-20 Thread Jay A. Kreibich
On Wed, Jul 20, 2011 at 04:52:11PM +, morning5...@gmail.com scratched on the wall: > I probably didn't explain it well enough, but my goal is that if a row > exists in the override table then ALL if the values from that table are > used. It doesn't seem like Jay's approach will accomplish

[sqlite] R-Tree Geometry Example...

2011-07-20 Thread John D. Marinuzzi
Does anybody have or know of another example of using the geometry callback in R-Trees? I am following the example on the site, but still can't wrap my mind around the concept. Thanks in advance. John ___ sqlite-users mailing list sqlite-users@s

Re: [sqlite] "override" table?

2011-07-20 Thread morning5591
I probably didn't explain it well enough, but my goal is that if a row exists in the override table then ALL if the values from that table are used. It doesn't seem like Jay's approach will accomplish that since it will only override non-NULL columns. I did get it working (I think) by using:

Re: [sqlite] "override" table?

2011-07-20 Thread Jay A. Kreibich
On Wed, Jul 20, 2011 at 11:21:32AM -0400, KeithB scratched on the wall: > I'd like to create a temporary table to "shadow" one of my persistent > tables. It will have the same columns and hold "override" values that, > when present, take precedence over the real values. So, I'd like to > search for

Re: [sqlite] "override" table?

2011-07-20 Thread Duquette, William H (318K)
On 7/20/11 8:27 AM, "Simon Slavin" wrote: >On 20 Jul 2011, at 4:21pm, KeithB wrote: > >> I'd like to create a temporary table to "shadow" one of my persistent >> tables. It will have the same columns and hold "override" values that, >> when present, take precedence over the real values. So, I'd l

Re: [sqlite] "override" table?

2011-07-20 Thread Simon Slavin
On 20 Jul 2011, at 4:21pm, KeithB wrote: > I'd like to create a temporary table to "shadow" one of my persistent > tables. It will have the same columns and hold "override" values that, > when present, take precedence over the real values. So, I'd like to > search for a row by primary key, lookin

[sqlite] "override" table?

2011-07-20 Thread KeithB
I'd like to create a temporary table to "shadow" one of my persistent tables. It will have the same columns and hold "override" values that, when present, take precedence over the real values. So, I'd like to search for a row by primary key, looking first in the override table, and if not found, th

[sqlite] [FTS3] The Compress and Uncompress functions

2011-07-20 Thread Abhinav Upadhyay
Hi, I have an FTS table with compress and uncompress options enabled. I am using zlib(3) for doing the compression. The compression function seems to be doing ok as I can see the size of the database coming down drastically. But I the uncompress function is not working properly. For example if I