Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread James K. Lowden
On Fri, 21 Mar 2014 09:35:19 -0500 Ben Peng wrote: > I have an application where data stored in columns can be lists of > integers (e.g. 158;42;76). I cannot really split such record into > multiple records (one for 158, one for 42 etc) and I am currently > storing them as VARCHAR because they re

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Simon Slavin
On 21 Mar 2014, at 7:57pm, Roger Binns wrote: > It also doesn't check the data, just the structure of the data. There was > a feature request ticket for several years for checksums to at least catch > unexpected changes to the data itself: > > https://www.sqlite.org/src/tktview?name=72b01a982

Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Max Vlasov
On Fri, Mar 21, 2014 at 8:06 PM, Ben Peng wrote: > > I guess I will have to take the longer route, namely define a customized > comparison function and translate user input internally. > There's an also virtual table method, probably not so easy to wrap the head around, but this one allows using

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/03/14 18:06, Simon Slavin wrote: > All useful as far as SQLite itself goes, and better than nothing. > Unfortunately, failing hard disks do weird things in weird orders. And > the interaction between the physical hard disk and the on-board cache

Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Ben Peng
Thanks Dan, I think I get your point. COLLATE not only provides a new way to compare values (what is what I need), but also gives new appearances to existing values by which they are sorted or grouped. So 158;42;76 can not appear as 158, 42, and 76 at the same time (158;42;76 == 42, 158;42;76 == 7

Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Dan Kennedy
On 03/21/2014 10:33 PM, Ben Peng wrote: Hi, Tristan, Your solution definitely works (we have defined a few custom functions) but our application hides databases from users but allows users to use simple conditions to retrieve results. To use this function, we would have to 1. teach users use th

Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Ben Peng
Hi, Tristan, Your solution definitely works (we have defined a few custom functions) but our application hides databases from users but allows users to use simple conditions to retrieve results. To use this function, we would have to 1. teach users use this function, which is hard to do because i

Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Tristan Van Berkom
On Fri, 2014-03-21 at 09:35 -0500, Ben Peng wrote: > Dear sqlite experts, I'm far from an "sqlite expert", others should be able to provide a more authoritive answer I think what you want is rather to simply define your own custom function to implement a custom match. I think using COLLATE is wr

[sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Ben Peng
Dear sqlite experts, I have an application where data stored in columns can be lists of integers (e.g. 158;42;76). I cannot really split such record into multiple records (one for 158, one for 42 etc) and I am currently storing them as VARCHAR because they represent a complete piece of information

Re: [sqlite] Trigger to another database

2014-03-21 Thread Clemens Ladisch
SQlite Sqlite wrote: > I try to write a trigger in db1 which inserts data to a table in db2. Triggers are not allowed to access other databases because those might not be attached. > is there a workournd to synchronize two tables between different databases? Your program could register a user-de

Re: [sqlite] System.Data.SQLite Deployment Mystery

2014-03-21 Thread dpybus
Dear Joe, Thank you for your helpful comments. I’ve finally got it going on ‘naïve’ Win 8 (and Win 7) computers, but I don’t understand why!! In short, I got it going by adopting the technique described here: http://rashimuddin.wordpress.com/tag/sqlite-interop-dll/ Perhaps you can s

Re: [sqlite] System.Data.SQLite Deployment Mystery

2014-03-21 Thread dpybus
Dear Markus, Thank you for your helpful comments. I’ve finally got it going on ‘naïve’ Win 8 (and Win 7) computers, but I don’t understand why!! In short, I got it going by adopting the technique described here: http://rashimuddin.wordpress.com/tag/sqlite-interop-dll/ Perhaps you ca

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Tim Streater
On 21 Mar 2014 at 01:06, Simon Slavin wrote: > On 20 Mar 2014, at 11:33pm, Richard Hipp wrote: > >> On Thu, Mar 20, 2014 at 7:18 PM, Tim Streater wrote: >> >>> I had a case where attempts to access a table in a user's db gave "no such >>> table", where 60 mins previously (according to the log)