Re: [sqlite] connection-specific user data in extensions

2010-11-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/22/2010 06:58 PM, Chris Wolf wrote: >> Hmm, if you mean apsw, Yes, I did. (I'm the author of APSW if that wasn't clear.) >> that's actually one of the things I wanted to >> do: change the >> Connection signature to accept an already open

Re: [sqlite] virtual tables

2010-11-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/22/2010 06:59 PM, dcharno wrote: > What are some of the things that people use virtual tables for? Are > there any good example usages? FTS3 uses them. Various CSV extensions do too. With my APSW package I include a virtual table that lets

Re: [sqlite] virtual tables

2010-11-22 Thread Ben Harper
I have a database library that abstracts various DB types, such as DBF, shapefiles, CSV, PostGIS, etc. I use the Sqlite virtual table mechanism to provide SQL functionality on top of any of these DB types. Normally one would only need to do this for crude databases, such as a CSV file, but the

Re: [sqlite] virtual tables

2010-11-22 Thread boscowitch
Am Montag, den 22.11.2010, 21:59 -0500 schrieb dcharno: > What are some of the things that people use virtual tables for? Are > there any good example usages? > ___ > sqlite-users mailing list > sqlite-users@sqlite.org >

[sqlite] virtual tables

2010-11-22 Thread dcharno
What are some of the things that people use virtual tables for? Are there any good example usages? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] connection-specific user data in extensions

2010-11-22 Thread Chris Wolf
Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/22/2010 11:31 AM, Chris Wolf wrote: > >> Is there a way for me to store one or more pointers to data structures >> as user data in a sqlite3 structure (i.e. the "connection")? >> > > Nope. It is also a

Re: [sqlite] connection-specific user data in extensions

2010-11-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/22/2010 11:31 AM, Chris Wolf wrote: > Is there a way for me to store one or more pointers to data structures > as user data in a sqlite3 structure (i.e. the "connection")? Nope. It is also a problem if you want to share a connection between

Re: [sqlite] Queries on PRAGMA table_info() [superview]

2010-11-22 Thread Petite Abeille
On Nov 22, 2010, at 10:09 PM, Jay A. Kreibich wrote: > Below is code for the "superview" virtual table module. It allows > *any* SQL statement to be turned into a read-only virtual table-- > including PRAGMA statements. Oh... very nice... thanks for sharing :)

Re: [sqlite] Queries on PRAGMA table_info() [superview]

2010-11-22 Thread Jay A. Kreibich
On Mon, Nov 22, 2010 at 01:29:29PM -0500, Igor Tandetnik scratched on the wall: > Duquette, William H (316H) wrote: > > PRAGMA table_info(my_table) returns a row for each column in my_table. Is > > it possible to do selects on this result set? > > No. > > >

Re: [sqlite] Trouble with adapter for custom class

2010-11-22 Thread Joshua Lippai
Thanks! That works, and it even simplifies my code a little. Regards, Josh On Mon, Nov 22, 2010 at 11:50 AM, Simon Slavin wrote: > > On 22 Nov 2010, at 4:37pm, Joshua Lippai wrote: > >> I decided that a decent way to implement this would be to create a >> dummy class in

Re: [sqlite] joining two sequences?

2010-11-22 Thread Petite Abeille
Hi Jim, On Nov 20, 2010, at 6:52 PM, Jim Morris wrote: >> This should return a the equivalent keys in the two maps. The basic >> idea is to compare the values in each key in foo(left outer join foo) >> with the values for each key in bar where there are any matching >> values(left outer join

Re: [sqlite] Queries on PRAGMA table_info()

2010-11-22 Thread Petite Abeille
On Nov 22, 2010, at 7:26 PM, Simon Slavin wrote: >> PRAGMA table_info(my_table) returns a row for each column in my_table. Is >> it possible to do selects on this result set? > > Nope. The PRAGMA command does not present data to the SQL engine, it returns > results directly. Grab the whole

Re: [sqlite] connection-specific user data in extensions

2010-11-22 Thread Chris Wolf
Chris Wolf wrote: > Is there a way for me to store one or more pointers to data structures > as user data in > a sqlite3 structure (i.e. the "connection")? I want to allocate some > structures specific to the extension I'm > thinking of and do this in sqlite3_extension_init(...) but have other

[sqlite] How to choose the good page size

2010-11-22 Thread Vander Clock Stephane
Hello, our database have around 50 millions rows the database have only one table with singleton value name(int)=valuet(int) the database will be store in an hardrive formatted with cluster of 64kb (but we can format it with lower if neccessary) the database must use the minimal neccessary

[sqlite] connection-specific user data in extensions

2010-11-22 Thread Chris Wolf
Is there a way for me to store one or more pointers to data structures as user data in a sqlite3 structure (i.e. the "connection")? I want to allocate some structures specific to the extension I'm thinking of and do this in sqlite3_extension_init(...) but have other routines have access without

Re: [sqlite] how to set pragma page size before the database has not yet created ?

2010-11-22 Thread Vander Clock Stephane
thanks ! On 11/22/2010 4:23 PM, Igor Tandetnik wrote: > Vander Clock Stephane wrote: >> i want to use the pragma command to setup the page size. however they say : >> "The page size may only be set if the database has not yet been created." >> >> but how to do because as

Re: [sqlite] Queries on PRAGMA table_info()

2010-11-22 Thread Duquette, William H (316H)
Thanks! On 11/22/10 10:26 AM, "Simon Slavin" wrote: On 22 Nov 2010, at 6:21pm, Duquette, William H (316H) wrote: > PRAGMA table_info(my_table) returns a row for each column in my_table. Is it > possible to do selects on this result set? Nope. The PRAGMA command does

Re: [sqlite] Queries on PRAGMA table_info()

2010-11-22 Thread Igor Tandetnik
Duquette, William H (316H) wrote: > PRAGMA table_info(my_table) returns a row for each column in my_table. Is it > possible to do selects on this result set? No. > Or do > you simply have to loop over it, and pull out what you need. Yes. -- Igor Tandetnik

Re: [sqlite] Queries on PRAGMA table_info()

2010-11-22 Thread Simon Slavin
On 22 Nov 2010, at 6:21pm, Duquette, William H (316H) wrote: > PRAGMA table_info(my_table) returns a row for each column in my_table. Is it > possible to do selects on this result set? Nope. The PRAGMA command does not present data to the SQL engine, it returns results directly. Grab the

[sqlite] Queries on PRAGMA table_info()

2010-11-22 Thread Duquette, William H (316H)
Howdy! PRAGMA table_info(my_table) returns a row for each column in my_table. Is it possible to do selects on this result set? Or do you simply have to loop over it, and pull out what you need. Thanks! Will -- Will Duquette -- william.h.duque...@jpl.nasa.gov Athena Development Lead -- Jet

Re: [sqlite] query question

2010-11-22 Thread Artur Reilin
> Artur Reilin wrote: >> CREATE TABLE [challenge_players] >> ( >>[player_id] INTEGER PRIMARY KEY , >>[player_name] TEXT >> ) >> >> CREATE TABLE [challenge_wins] >> ( >>[round_id] INTEGER PRIMARY KEY , >>[round_winner] INTEGER >> ) >> >> I tried to do a joined

Re: [sqlite] query question

2010-11-22 Thread Igor Tandetnik
Artur Reilin wrote: > CREATE TABLE [challenge_players] > ( >[player_id] INTEGER PRIMARY KEY , >[player_name] TEXT > ) > > CREATE TABLE [challenge_wins] > ( >[round_id] INTEGER PRIMARY KEY , >[round_winner] INTEGER > ) > > I tried to do a joined select to get

[sqlite] query question

2010-11-22 Thread Artur Reilin
Hello. So I tested yesterday some queries with joins and cannot found the right solution. So I'm trying it here and hope you have a solution or an Idea. I think it's some really easy thing and I just don't get it. Okay let's see: I have the following scheme: CREATE TABLE [challenge_players] (

Re: [sqlite] NO_GETTOD

2010-11-22 Thread Dan Kennedy
On 11/22/2010 11:48 PM, Black, Michael (IS) wrote: > Bug in 3.7.3? > gcc -c -DNO_GETTOD sqlite3.c > sqlite3.c: In function âunixCurrentTimeInt64â: > sqlite3.c:27870: error: âiâ undeclared (first use in this function) > sqlite3.c:27870: error: (Each undeclared identifier is reported only once >

Re: [sqlite] Trouble with adapter for custom class

2010-11-22 Thread Simon Slavin
On 22 Nov 2010, at 4:37pm, Joshua Lippai wrote: > I decided that a decent way to implement this would be to create a > dummy class in which I first wrap any objects that are not NumPy > datatypes or datetime. Then, I wrote an adapter function that I could > register the dummy class with, with

[sqlite] NO_GETTOD

2010-11-22 Thread Black, Michael (IS)
Bug in 3.7.3? gcc -c -DNO_GETTOD sqlite3.c sqlite3.c: In function âunixCurrentTimeInt64â: sqlite3.c:27870: error: âiâ undeclared (first use in this function) sqlite3.c:27870: error: (Each undeclared identifier is reported only once sqlite3.c:27870: error: for each function it appears in.) static

[sqlite] Trouble with adapter for custom class

2010-11-22 Thread Joshua Lippai
Hello all, I am in the process of writing a program using sqlite3 whose purpose is to "convert" a custom type of 2-dimensional array into an sqlite table. My progress has been rather good, but I've run into a stumbling block. This type of array - a NumPy recarray - can take any type of data

Re: [sqlite] temp files for app file format

2010-11-22 Thread Scott Frankel
On Nov 22, 2010, at 5:26 AM, Igor Tandetnik wrote: > Scott Frankel wrote: >> Are journal files written to disk by applications that create SQLite >> DBs on the fly? If so, what are they called and where are they >> written to? > > You seem to refer to in-memory

Re: [sqlite] how can I use a larger cache ? "Application Defined Page Cache." ??

2010-11-22 Thread Pavel Ivanov
> I do not set anything for the "application defined page cache", so > what is the behavior of the default one? Default implementation of page cache uses all the size you said it to use and in some cases even more. So don't worry about that. Just remember that cache_size is not a global setting,

Re: [sqlite] filling an in-memory database from a byte stream?

2010-11-22 Thread Pavel Ivanov
> Would it be possible to create an in-memory database and fill it from a byte > stream or a file? If your Java driver allows you to attach your own VFS (Virtual File System) then you can achieve your goal using it. Otherwise there's no way to do that. Pavel On Mon, Nov 22, 2010 at 9:42 AM,

[sqlite] filling an in-memory database from a byte stream?

2010-11-22 Thread Niemann, Hartmut
Hello *! I am using sqlite (with Java) as a readonly database in a viewer application. One problem is that the database can reside not only on the local hard disc, but also on a possibly slowly connected remote system that can be contacted only via ftp or some proprietary interface. I would

Re: [sqlite] Confused by import of NULL values from CSV file

2010-11-22 Thread Jean-Christophe Deschamps
>I import a CSV flat file into a table (using sqliteman as GUI). The >flat file has NULL values as simply no data between two delimiters (I >use 'tab' as Delimiter). > >The resulting table does not treat 'no data' between 2 delimiters as >NULL. When I run CHECK constraints etc. on it it

Re: [sqlite] temp files for app file format

2010-11-22 Thread Igor Tandetnik
Scott Frankel wrote: > Are journal files written to disk by applications that create SQLite > DBs on the fly? If so, what are they called and where are they > written to? You seem to refer to in-memory (:memory:) database. No files, journal or otherwise, are created for

Re: [sqlite] EXTERNAL: Confused by import of NULL values from CSV file

2010-11-22 Thread Black, Michael (IS)
That's not SQLite doing it...it's sqliteman treating it as empy strings. If you want it be NULL after import just update it yourself. UPDATE mytable SET key=NULL where key=''; Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems

Re: [sqlite] Confused by import of NULL values from CSV file

2010-11-22 Thread Igor Tandetnik
rf rf wrote: > I import a CSV flat file into a table (using sqliteman as GUI). The flat file > has NULL values as simply no data between two > delimiters (I use 'tab' as Delimiter). In CSV format, there is no way to distinguish between NULL and '' (an empty string). --

Re: [sqlite] how to set pragma page size before the database has not yet created ?

2010-11-22 Thread Igor Tandetnik
Vander Clock Stephane wrote: > i want to use the pragma command to setup the page size. however they say : > "The page size may only be set if the database has not yet been created." > > but how to do because as soon as i do sqlite3_open_v2 then the database > is created ?

Re: [sqlite] Loading a FTS3 table into ram without reindexing

2010-11-22 Thread Richard Hipp
On Sun, Nov 21, 2010 at 7:49 PM, boscowitch wrote: > > or can i advise sqlite to load at least the whole pre generated index > into the ram to speed it up? > http://www.sqlite.org/backup.html -- D. Richard Hipp d...@sqlite.org

[sqlite] Auto Reply: sqlite-users Digest, Vol 35, Issue 22

2010-11-22 Thread bogdan . coman
This is an auto-replied message. I am out of office right now, with no access to e-mail. I will be returning on Friday, 03 Dec. If you need Berkeley DB assistance before then, please use My Oracle Support or the Oracle Berkeley DB Forums. For urgent issues, please contact Adam Whitter at

[sqlite] Confused by import of NULL values from CSV file

2010-11-22 Thread rf rf
Hello hopefully someone can help me out on this item   I import a CSV flat file into a table (using sqliteman as GUI).  The flat file has NULL values as simply no data between two delimiters (I use 'tab' as Delimiter).   The resulting table does not treat 'no data' between 2 delimiters as NULL. 

[sqlite] how to set pragma page size before the database has not yet created ?

2010-11-22 Thread Vander Clock Stephane
Hello, i want to use the pragma command to setup the page size. however they say : "The page size may only be set if the database has not yet been created." but how to do because as soon as i do sqlite3_open_v2 then the database is created ? and to execute the pragma i need connection to the

Re: [sqlite] Compile 64bit version of SQLIte on Solaris?

2010-11-22 Thread Lynton Grice
Hi Dan, You are THE MAN! You are 100% correct...I was using GCC in: /usr/local/bin/gcc But should have been using: /usr/sfw/bin/gcc Thanks ;-) Lynton -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy Sent: 22

Re: [sqlite] Compile 64bit version of SQLIte on Solaris?

2010-11-22 Thread Dan Kennedy
On 11/22/2010 03:25 PM, Lynton Grice wrote: > Hi there, > > That does not work, I tried that already. > > # /usr/local/bin/gcc -m64 -D_FILE_OFFSET_BITS=64 -c -fPIC -DHAVE_USLEEP > sqlite3.c > sqlite3.c:1: sorry, unimplemented: 64-bit mode not compiled in > # > > And I am on a 64-bit Solaris box...

Re: [sqlite] Compile 64bit version of SQLIte on Solaris?

2010-11-22 Thread Lynton Grice
Hi there, That does not work, I tried that already. # /usr/local/bin/gcc -m64 -D_FILE_OFFSET_BITS=64 -c -fPIC -DHAVE_USLEEP sqlite3.c sqlite3.c:1: sorry, unimplemented: 64-bit mode not compiled in # And I am on a 64-bit Solaris box... And other ideas? Lynton -Original Message- From:

[sqlite] temp files for app file format

2010-11-22 Thread Scott Frankel
Hi all, Are journal files written to disk by applications that create SQLite DBs on the fly? If so, what are they called and where are they written to? I've recently started using SQLite as a file format for the application I'm developing. Tracking down a mysterious bus error crash

Re: [sqlite] Compile 64bit version of SQLIte on Solaris?

2010-11-22 Thread alm
use -m64 flag to compile and link > I just tried to see what ELF class is in after running the following > (added > -D_FILE_OFFSET_BITS=64): > > /usr/local/bin/gcc -D_FILE_OFFSET_BITS=64 -c -fPIC -DHAVE_USLEEP > sqlite3.c > > # file libsqlite3.so grep ELF > libsqlite3.so: ELF 32-bit LSB dynamic