[sqlite] Third test of json and index expressions, now it works

2015-09-08 Thread James K. Lowden
On Sat, 5 Sep 2015 09:07:11 -0700 Darko Volaric wrote: > I'm asking why the SQL standard restricts the use of aliases in this > way and what the benefit of this restriction is. Rationales in SQL are hard to come by. The language was promulgated by a private firm, and the standard evolved under

[sqlite] Using collation instead a virtual table

2015-09-08 Thread Eduardo Morras
Hello, I have a virtual table that implements query perceptual hashing data[1]. Now I'm thinking about converting the virtual table implementation in a collation on a normal sqlite3 table, but collation requieres that '=','<' and '>' be well defined by obeying the rules cited on

[sqlite] Fwd: OT: Oracle functions for SQlite

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! It's nice that you shared this, probably if you also host/mirror the on github you'll get an even broader audience and probably feedback and enhancements. I suggest to to fork this project https://github.com/mackyle/sqlite it's almost daily updated with the https://www.sqlite.org and

[sqlite] Variables in statements

2015-09-08 Thread James K. Lowden
On Thu, 03 Sep 2015 16:44:50 + Peter Haworth wrote: > The statement I'm using is: > > SELECT * FROM myTable WHERE myKey IN (:1) > > If the value I supply to be used as :1 is a single integer, the SELECT > finds the correct rows. If the value is a comma separated list of > integers, e.g

[sqlite] Fwd: OT: Oracle functions for SQlite

2015-09-08 Thread Petite Abeille
Perhaps of interest: http://sqlite-libs.cis.ksu.edu > Begin forwarded message: > > From: St?phane Faroult > Subject: OT: Oracle functions for SQlite > Date: September 8, 2015 at 2:30:24 AM GMT+2 > To: "Oracle-L (E-mail)" > Reply-To: sfaroult at roughsea.com > > I don't know if there are

[sqlite] Command line sqlite3 program bug

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! After seem several emails from a user asking about how to use sqlite3 through shell scripts, I remember my experiences with sqlite3 but didn't mind to report it, but now I think that it's worth mention it because it'll hurt several users. The bug/problem is that the sqlite3 command

[sqlite] Help with ext/misc/regex.c extension

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! Now I realize that in the function re_balanced I also need restore the ReInput back in case of not matching: ___ static int re_balanced( ??? ReInput *p, ??? int cb, /* char that opens a balanced expression */ ??? int ce? /* char that closes a balanced expression */ ){ ? int c

[sqlite] Help with ext/misc/regex.c extension

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! I'm trying to add a new option to ext/misc/regex.c it's "\p()" that's like the LUA operator "%b" %b/xy/, where /x/ and /y/ are two distinct characters; such item matches strings that start with?/x/, end with?/y/, and where the /x/ and /y/ are /balanced/. This means that, if one reads

[sqlite] Using collation instead a virtual table

2015-09-08 Thread Richard Hipp
On 9/8/15, Eduardo Morras wrote: > > > Hello, > > I have a virtual table that implements query perceptual hashing data[1]. Now > I'm thinking about converting the virtual table implementation in a > collation on a normal sqlite3 table, but collation requieres that '=','<' > and '>' be well

[sqlite] To the sqlite wish list, usefull internal/extensions as library

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! Sqlite like any other project has developed a lot of cross platform/utilities code but most of it remain locked down to sqlite3 alone. Example the latest json1 functions, vfs, sqlite3_printf, thread/lock management functions, ..., would be nice if they could also be used by the

[sqlite] To the sqlite wish list, usefull internal/extensions as library

2015-09-08 Thread Simon Slavin
On 8 Sep 2015, at 1:43pm, Domingo Alvarez Duarte wrote: > Sqlite like any other project has developed a lot of cross platform/utilities > code but most of it remain locked down to sqlite3 alone. > > Example the latest json1 functions, vfs, sqlite3_printf, thread/lock > management functions,

[sqlite] Command line sqlite3 program bug

2015-09-08 Thread Gerry Snyder
The Command Line Interface has the command: .bail on which will do what you want. HTH, Gerry Snyder --- On 9/8/2015 9:54 AM, Domingo Alvarez Duarte wrote: > Hello ! > > After seem several emails from a user asking about how to use sqlite3

[sqlite] To the sqlite wish list, sqldiff, data sync

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! I forgot to include this topics on my wish list: Sqldiff is an amazing tool added to sqlite, but it can be even more useful if it's integrated on sqlite itself, right know sqldiff needs two databases to operate, but if included in sqlite3 somehow it could generate the diffs on the go

[sqlite] To the sqlite wish list

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! Sqlite is really a very nice piece of software and it could even be better, here is things to add to the wish list: - Implement sql "CREATE FUNCTION" even if it is as simple of only allowing a limited set of operations, refactoring the actual trigger implementation to allow it be

[sqlite] Function lower on index expressions not allowed ?

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! The create_collation functions have a signature similar to create_function but no mention abount add SQLITE_DETERMINISTIC to then, they do not need it ? Cheers ! > Tue Sep 08 2015 12:04:44 am CEST CEST from "Richard Hipp" > Subject: Re: [sqlite] Function lower on index expressions

[sqlite] Function lower on index expressions not allowed ?

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! I'm converting a database from postgresql and when I tried to create this index it fails: CREATE UNIQUE INDEX country_name_idx on country(lower(name)); Error: "non-deterministic functions prohibited in index expressions" Can the lower function be non deterministic ? I know