Re: [sqlite] Index on expressions

2014-09-03 Thread Nico Williams
Also, of course, MERGE is very convenient, syntactically and semantically. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Index on expressions

2014-09-03 Thread Nico Williams
On Wed, Sep 3, 2014 at 6:16 PM, Simon Slavin wrote: > I'm used to calling them 'computed columns' but yes, they should be > relatively easy to implement, as long as users accept a bunch of restructions > on what they can refer to, roughly equivalent to the restrictions on what can > be used in

Re: [sqlite] Index on expressions

2014-09-03 Thread Simon Slavin
On 3 Sep 2014, at 8:21pm, John McKown wrote: > Those are _both_ nice features. I don't know for sure, but somehow it > seems that virtual columns would be easier to implement. I'm used to calling them 'computed columns' but yes, they should be relatively easy to implement, as long as users acc

Re: [sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread Scott Robison
On Wed, Sep 3, 2014 at 3:20 PM, Stephan Beal wrote: > On Wed, Sep 3, 2014 at 11:13 PM, jose isaias cabrera < > jic...@cinops.xerox.com> wrote: > > PHP should handle the encoding whether or not it has the BOM. > > > > As "should" Excel! > > Unlike Excel, with PHP the fix is easy - remove the BOM,

Re: [sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread Stephan Beal
On Wed, Sep 3, 2014 at 11:13 PM, jose isaias cabrera < jic...@cinops.xerox.com> wrote: > > "Stephan Beal" wrote... > > On Wed, Sep 3, 2014 at 9:56 PM, big stone wrote: >> >> issues. Many software chokes on a BOM (e.g. i've seen PHP-based sites go >> down because a dev's editor inserted one and i

Re: [sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread jose isaias cabrera
"Stephan Beal" wrote... On Wed, Sep 3, 2014 at 9:56 PM, big stone wrote: issues. Many software chokes on a BOM (e.g. i've seen PHP-based sites go down because a dev's editor inserted one and it got deployed). PHP should handle the encoding whether or not it has the BOM. josé ___

Re: [sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread Stephan Beal
On Wed, Sep 3, 2014 at 9:56 PM, big stone wrote: > As a windows user, I would like that sqlite.exe would support the encoding > 'UTF-8-SIG' for files. > > 'UTF-8-SIG' = normal 'UTF-8' file, but starting by a Byte-Order-Mark. > > > (see http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) > If y

Re: [sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread Scott Robison
On Wed, Sep 3, 2014 at 2:03 PM, big stone wrote: > ... unless I'm fooled by the sqlite.exe dos output and it's working already > as I hope. > > (Oups) > The pragma encoding only controls the storage format of text strings, I don't believe it has any impact on imported files. -- Scott Robison _

Re: [sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread big stone
... unless I'm fooled by the sqlite.exe dos output and it's working already as I hope. (Oups) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] papercut wish list : a PRAGMA encoding='UTF-8-SIG'

2014-09-03 Thread big stone
Hello, As a windows user, I would like that sqlite.exe would support the encoding 'UTF-8-SIG' for files. 'UTF-8-SIG' = normal 'UTF-8' file, but starting by a Byte-Order-Mark. (see http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) For windows user, it would be a truly appreciated improvement.

Re: [sqlite] Index on expressions

2014-09-03 Thread John McKown
On Wed, Sep 3, 2014 at 1:35 PM, Petite Abeille wrote: > > On Sep 3, 2014, at 3:01 PM, Dominique Devienne wrote: > >> Asked differently, if adding this support, could this be done by adding >> virtual / computed columns to tables, and indexing those columns? > > Ohohohoho… virtual columns [1][2]….

Re: [sqlite] Index on expressions

2014-09-03 Thread Petite Abeille
On Sep 3, 2014, at 3:01 PM, Dominique Devienne wrote: > Asked differently, if adding this support, could this be done by adding > virtual / computed columns to tables, and indexing those columns? Ohohohoho… virtual columns [1][2]…. yes… shinny! :) Now that would be rather cool. On the other

Re: [sqlite] Index on expressions

2014-09-03 Thread Shane Harrelson
Use a trigger to populate your index column. http://www.sqlite.org/lang_createtrigger.html On Wed, Sep 3, 2014 at 9:01 AM, Dominique Devienne wrote: > On Wed, Sep 3, 2014 at 2:52 PM, Richard Hipp wrote: > > > SQLite does not (yet) support indexes on expressions. > > > This begs the question: A

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Nelson, Erik - 2
Bob Moran wrote on Wednesday, September 03, 2014 12:45 PM > > One added note: My GUI is using QT4, where in this case the SQL text > goes something like: > > QString qstr = "select id, step, temp from protocols where id > = %1"; > qstr = qstr.arg(id); > char * str = (char*)qPrin

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Bob Moran
Thank you for the prompt responses. Bob Moran -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Wednesday, September 03, 2014 12:41 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Cannot re

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Bob Moran
One added note: My GUI is using QT4, where in this case the SQL text goes something like: QString qstr = "select id, step, temp from protocols where id = %1"; qstr = qstr.arg(id); char * str = (char*)qPrintable(qstr); sqlite3_prepare_v2( db, str, qstr.Length+1, &st

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Simon Slavin
On 3 Sep 2014, at 5:18pm, Bob Moran wrote: > I am using the amalgamation. Simply added the SQLITE3.c and .H files to my > project. I am developing with VisualGDB (VS 2010) cross compiling (building > on Windows 7, running on RPI). No added compiler directives (hopefully, that > is the problem

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Bob Moran
I am using the amalgamation. Simply added the SQLITE3.c and .H files to my project. I am developing with VisualGDB (VS 2010) cross compiling (building on Windows 7, running on RPI). No added compiler directives (hopefully, that is the problem). Bob Moran -Original Message- From: sqlite-

Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-03 Thread Carlos A. Gorricho (HGSAS)
​When I start sqlite double clicking the icon in the Mac Applications folder: Last login: Wed Sep 3 10:13:32 on ttys000 HEPTAGON-GROUP-SAS:~ carlosgorricho$ /Applications/sqlite3 ; exit; SQLite version 3.8.5 2014-06-04 14:06:34 Enter ".help" for usage hints. Connected to a *transient in-memor

Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-03 Thread Simon Slavin
On 3 Sep 2014, at 1:51pm, Richard Hipp wrote: > What version of SQLite is installed? Or rather, when you start the shell tool 'sqlite3' what version does it report itself as ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlit

Re: [sqlite] Index on expressions

2014-09-03 Thread Dominique Devienne
On Wed, Sep 3, 2014 at 2:52 PM, Richard Hipp wrote: > SQLite does not (yet) support indexes on expressions. This begs the question: Are there plans, possibly ongoing, to add this support? Any timeframe? Asked differently, if adding this support, could this be done by adding virtual / computed

Re: [sqlite] Fwd: Problems uploading CSV into sqlite3 DB

2014-09-03 Thread Richard Hipp
On Tue, Sep 2, 2014 at 9:07 PM, Carlos A. Gorricho (HGSAS) < cgorri...@heptagongroup.co> wrote: > Dear all, > > I am experiencing some difficulties loading CSV data into it. > > I am using the precompiled binary available on the web site for Mac OSX. I > am running OS X 10.9.4 on a Mac Book Pro. >

Re: [sqlite] Index on expressions

2014-09-03 Thread Richard Hipp
SQLite does not (yet) support indexes on expressions. On Tue, Sep 2, 2014 at 9:06 PM, Philippe Riand wrote: > Is there a way to create indexes based on expressions instead of simple > columns (see: > http://www.postgresql.org/docs/8.1/static/indexes-expressional.html)? The > idea is to have som

[sqlite] Fwd: Problems uploading CSV into sqlite3 DB

2014-09-03 Thread Carlos A. Gorricho (HGSAS)
Dear all, I am experiencing some difficulties loading CSV data into it. I am using the precompiled binary available on the web site for Mac OSX. I am running OS X 10.9.4 on a Mac Book Pro. When following instructions to upload CSV on a new database: sqlite> *.mode csv* sqlite> *.import My-CSV-f

[sqlite] Index on expressions

2014-09-03 Thread Philippe Riand
Is there a way to create indexes based on expressions instead of simple columns (see: http://www.postgresql.org/docs/8.1/static/indexes-expressional.html)? The idea is to have some custom functions that extract data from a JSON column and allow a fast query based on an index. This is the strategy u

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Hick Gunter
Maybe you are mixing C malloc/free with sqlite3 memory allocation routines? Like allocating from sqlite and then freeing to C or vice versa? -Ursprüngliche Nachricht- Von: Bob Moran [mailto:bmo...@cicaccess.com] Gesendet: Mittwoch, 03. September 2014 06:25 An: General Discussion of SQLite