Re: [sqlite] Checking for existence of in-memory tables

2011-11-25 Thread Dilip Ranganathan
Thanks to everyone for responding. I had turned off email delivery a few months ago but forgot to turn it back on when I got back to working with Sqlite again. Thanks Peter. I guess this means there is really nothing in my code that needs to change other than replacing the explicit database name in

Re: [sqlite] Convert data to binary

2011-11-25 Thread Dan Kennedy
On 11/26/2011 05:02 AM, Nico Williams wrote: You can CAST TEXT to BLOB, and you can use x'' for literal BLOBs. You can. The result of which is a blob that corresponds to either the utf-8 or utf-16 (big or little endian) encoding of the text, depending on the encoding used by the database file.

Re: [sqlite] sqlite support for geometric column types?

2011-11-25 Thread Simon Slavin
On 26 Nov 2011, at 4:49am, Peter Aronson wrote: > Not directly. But Alessandro Furieri has created a version of SQLite with > OGC conforming geometry columns, called SpatiaLite. It can be found here: > > http://www.gaia-gis.it/spatialite/ Wow. Simon. _

Re: [sqlite] sqlite support for geometric column types?

2011-11-25 Thread Peter Aronson
Not directly. But Alessandro Furieri has created a version of SQLite with OGC conforming geometry columns, called SpatiaLite. It can be found here: http://www.gaia-gis.it/spatialite/ It's based on an older version of SQLite (3.6.16, but a beta version supports 3.7.3), and it uses a more restric

Re: [sqlite] sqlite support for geometric column types?

2011-11-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/11/11 20:34, Senthil_25 wrote: > Just want to know whether sqlite support for gemotric column types? The Rtree extension distributed with SQLite will likely meet your needs: http://www.sqlite.org/rtree.html Roger -BEGIN PGP SIGNATURE

Re: [sqlite] sqlite support for geometric column types?

2011-11-25 Thread Simon Slavin
On 26 Nov 2011, at 4:34am, Senthil_25 wrote: > Just want to know whether sqlite support for gemotric column types? Geometric ? Can you give an example ? The best documentation for data types is here: but we may know a way to do what you want to do. Sim

[sqlite] sqlite support for geometric column types?

2011-11-25 Thread Senthil_25
Hi, I am new to sqlite. Just want to know whether sqlite support for gemotric column types? Please Help me... -- View this message in context: http://old.nabble.com/sqlite-support-for-geometric-column-types--tp32876624p32876624.html Sent from the SQLite mailing list archive at Nabble.com. ___

Re: [sqlite] Convert data to binary

2011-11-25 Thread Pavel Ivanov
> I'd like to store any data as binary in my sqlite database, I approached > the problem by trying to hex() the input because the x' ' operator accepts > hex and outputs binary, for example: You should convert you binary data into hex in your programming language outside SQLite if you want to conc

Re: [sqlite] [sqlite TOO slow

2011-11-25 Thread Gaurav Vyas
On the different note, I am having about 1000 connection to the same SQLite data and as expected, it will be slower. What would be an efficient way to make it fast? I am opening dataset as Read Only. Thanks Gaurav On Fri, Nov 25, 2011 at 4:52 PM, Jay A. Kreibich wrote: > On Thu, Nov 24, 2011 a

Re: [sqlite] [sqlite TOO slow

2011-11-25 Thread Jay A. Kreibich
On Thu, Nov 24, 2011 at 05:22:38PM +, Simon Slavin scratched on the wall: > On 24 Nov 2011, at 5:10pm, Jay A. Kreibich wrote: > > On Thu, Nov 24, 2011 at 08:08:12AM +, Simon Slavin scratched on the > > wall: > > > >> It is faster to search integers than it is to search real numbers. > >

Re: [sqlite] Convert data to binary

2011-11-25 Thread Nico Williams
You can CAST TEXT to BLOB, and you can use x'' for literal BLOBs. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Convert data to binary

2011-11-25 Thread Petite Abeille
On Nov 25, 2011, at 10:23 PM, Carl Desautels wrote: > x'hex("hello world")' sqlite> select x'68656C6C6F20776F726C64'; hello world x denotes a blob literal: "BLOB literals are string literals containing hexadecimal data and preceded by a single "x" or "X" character." http://www.sqlite.org/lan

[sqlite] Convert data to binary

2011-11-25 Thread Carl Desautels
I'd like to store any data as binary in my sqlite database, I approached the problem by trying to hex() the input because the x' ' operator accepts hex and outputs binary, for example: x'hex("hello world")' but that syntax doesn't work, is there any way to make storing any data as its binary valu

Re: [sqlite] Difference between FUNCTION(X)>='Y' and FUNCTION(X)>=FUNCTION('Y')

2011-11-25 Thread Soundfaction
Thanks for the tip for doing hex() on the results. My function wasn't returning what I expected due to sqlite3_result_text16 taking bytes not characters. it now works fine. Soundfaction wrote: > > I have a situation where I get different results for this: > > select ... where FUNCTION(X)>=

Re: [sqlite] Difference between FUNCTION(X)>='Y' and FUNCTION(X)>=FUNCTION('Y')

2011-11-25 Thread Simon Davies
On 25 November 2011 09:53, Soundfaction wrote: > > I have a situation where I get different results for this: > > select ... where FUNCTION(X)>='Y' > > vs > > select ... where FUNCTION(X)>=FUNCTION('Y') > > And FUNCTION('Y')  == 'Y' so I thought there should be no difference between > the two quer

[sqlite] Difference between FUNCTION(X)>='Y' and FUNCTION(X)>=FUNCTION('Y')

2011-11-25 Thread Soundfaction
I have a situation where I get different results for this: select ... where FUNCTION(X)>='Y' vs select ... where FUNCTION(X)>=FUNCTION('Y') And FUNCTION('Y') == 'Y' so I thought there should be no difference between the two queries. For some reason in the latter case it behaves as: select