Re: [sqlite] Small change to support poor man's extended features

2010-05-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/04/2010 09:41 PM, Aron Rubin wrote: > Most execution environments that support calling including C and > Sqlite use a stack of frames. C has a conceptual stack - the actual implementation does not require one. SQLite has no such thing - the int

[sqlite] Implementing a CREATE_FUNCTION function

2010-05-04 Thread Dan Bishop
It's convenient to be able to define new functions in C. But sometimes, it would be *more* convenient to be able to define new functions in SQL. This could be done by registering a CREATE_FUNCTION() function; then you could write something like: SELECT CREATE_FUNCTION('LEFT', 2, 'SUBSTR(?1, 1

Re: [sqlite] Small change to support poor man's extended features

2010-05-04 Thread Aron Rubin
On Tue, May 4, 2010 at 9:00 PM, Roger Binns wrote: > On 05/04/2010 03:50 PM, Aron Rubin wrote: >> If I could have a SQL function that returned an id of the current >> frame I could create poor man's variables. > > You'll need to be more specific about what you mean here.  Give an example > of the

Re: [sqlite] ANN: O'Reilly book "Using SQLite" available for pre-order

2010-05-04 Thread Doug
> I've always been mystified why these kind of books duplicate > installation instructions that already exist on the download site of whatever they > are documenting. Same thing with the copious amounts of 'reference' > information that adds no value over what is on the web site and the book will

Re: [sqlite] Small change to support poor man's extended features

2010-05-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/04/2010 03:50 PM, Aron Rubin wrote: > If I could have a SQL function that returned an id of the current > frame I could create poor man's variables. You'll need to be more specific about what you mean here. Give an example of the code you would

[sqlite] ANN: O'Reilly book "Using SQLite" available for pre-order

2010-05-04 Thread Hal Faulkner
On 05/04/2010 02:19 PM, Jay A. Kreibich wrote: | I invite all SQLite list members to register and participate: Something I always hope for in a book are specific examples of the use of a specific API (as defined by wikipedia) to get from a program environment to another program or data engine,

Re: [sqlite] ANN: O'Reilly book "Using SQLite" available for pre-order

2010-05-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/04/2010 02:19 PM, Jay A. Kreibich wrote: > I invite all SQLite list members to register and participate: OpenID - no need for yet another username and password. I've always been mystified why these kind of books duplicate installation instruc

Re: [sqlite] Doing fine with SQLite

2010-05-04 Thread Matt Young
All working. R had sufficient piping to files and allowed me to get it. On 5/4/10, Gabor Grothendieck wrote: > You don't need to dump the data to a csv file and then read it into R > and there is no need to use the sqlite3 console at all as R's RSQLite > package can directly read and write SQLit

[sqlite] Small change to support poor man's extended features

2010-05-04 Thread Aron Rubin
If I could have a SQL function that returned an id of the current frame I could create poor man's variables. In turn that would allow me to create return locations for stored procedure triggers and branching. The id would need to be unique against any parallel executions. -- Aron Rubin Handy Husb

Re: [sqlite] why sqlite engine gets slower when executing transactions

2010-05-04 Thread Simon Slavin
On 4 May 2010, at 1:54pm, Romica Dascalescu wrote: > We are using sqlite to generate a schema with ~600 tables + 500 indexes + 50 > views and some other triggers. Apparently your developer is some kind of Autistic data-warehousing genius who can keep 600 tables with different columns straight

Re: [sqlite] reuse of named parameters within a single statement

2010-05-04 Thread Aron Rubin
It would be great to include "SELECT @myparam, @myparam, @myotherparam, @myparam" is it equivalent to "SELECT ?1, ?1, ?2, ?1" in the documentation on parameters (in expressions). Thank you, Aron On 5/4/10, Jay A. Kreibich wrote: > On Tue, May 04, 2010 at 01:48:52PM -0400, Aron Rubin scratched o

Re: [sqlite] reuse of named parameters within a single statement

2010-05-04 Thread Jay A. Kreibich
On Tue, May 04, 2010 at 01:48:52PM -0400, Aron Rubin scratched on the wall: > Sorry if this is a repeat but I am having a heck of a time figuring > out a definitive answer to a this question on the list. Certainly it > is not addressed in the documentation. > > Is the following valid string to pre

Re: [sqlite] reuse of named parameters within a single statement

2010-05-04 Thread Igor Tandetnik
Aron Rubin wrote: > Is the following valid string to prepare: > "SELECT @myparam, @myparam, @myparam, @myotherparam" Yes. > If so, which is it equivalent to: > A - "SELECT ?1, ?1, ?1, ?2" > or > B - "SELECT ?1, ?2, ?3, ?4" A -- Igor Tandetnik ___ s

[sqlite] reuse of named parameters within a single statement

2010-05-04 Thread Aron Rubin
Sorry if this is a repeat but I am having a heck of a time figuring out a definitive answer to a this question on the list. Certainly it is not addressed in the documentation. Is the following valid string to prepare: "SELECT @myparam, @myparam, @myparam, @myotherparam" If so, which is it equival

[sqlite] INSERT questions

2010-05-04 Thread Mark Coles
Hi there, trying to INSERT a new row into a table and got a few errors which I think I've sorted, I was getting a couple of errors that date columns for FirstCreated and LastModified (datetime Type) may not be NULL, so I included them in my insert line as follows INSERT INTO Aircraft (FirstCr

[sqlite] why sqlite engine gets slower when executing transactions

2010-05-04 Thread Romica Dascalescu
Hi, We are using sqlite to generate a schema with ~600 tables + 500 indexes + 50 views and some other triggers. Our module: - Opens a transaction - Creates a table - Inserts some rows - Commits the transaction It seems this takes a lot of time to execute (

[sqlite] ANN: O'Reilly book "Using SQLite" available for pre-order

2010-05-04 Thread Jay A. Kreibich
In conjunction with O'Reilly Media, I am happy to announce that the book "Using SQLite" is now available for pre-order. When released later this summer, the title should also be available in several popular ebook formats. O'Reilly Media: http://oreilly.com/catalog/9780596521189/ A

Re: [sqlite] Doing fine with SQLite

2010-05-04 Thread Gabor Grothendieck
You don't need to dump the data to a csv file and then read it into R and there is no need to use the sqlite3 console at all as R's RSQLite package can directly read and write SQLite databases. Also see the sqldf package. On Tue, May 4, 2010 at 1:02 PM, Matt Young wrote: > I can work SQLite from

Re: [sqlite] Encryption of sqlite DB

2010-05-04 Thread Igor Tandetnik
Timothy A. Sawyer wrote: > The easiest way to encrypt a specific row is to put the data through > some > sort of one way hash function before you write the data to the table. > However since this is symmetric, anyone with the key can decrypt the > data > easily. A function is either one-way or

Re: [sqlite] Doing fine with SQLite

2010-05-04 Thread Pavel Ivanov
>  You can't put dot-commands on the command line.  Try: I think you can with something like this (assuming your shell is bash): echo $'.mode csv\nselect * from selected limit 4' | sqlite3 test.db Pavel On Tue, May 4, 2010 at 1:11 PM, Jay A. Kreibich wrote: > On Tue, May 04, 2010 at 10:02:06A

Re: [sqlite] Doing fine with SQLite

2010-05-04 Thread Black, Michael (IS)
echo .mode csv >input.sql echo select * from selected limit 4 >>input.sql sqlite3 test.db http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinf

Re: [sqlite] Doing fine with SQLite

2010-05-04 Thread Jay A. Kreibich
On Tue, May 04, 2010 at 10:02:06AM -0700, Matt Young scratched on the wall: > sqlite3 test.db ".mode csv select * from selected limit 4" > > Makes sqlite choke because I do not know what the inline terminator is > for a text invocation argument, You can't put dot-commands on the command li

[sqlite] Doing fine with SQLite

2010-05-04 Thread Matt Young
I can work SQLite from by R stat package, but I am having hard time mixing special sqlite command intermixed with SQL statements when I send a text sequence to swqlite (even from the dos consol) sqlite3 test.db ".mode csv select * from selected limit 4" Makes sqlite choke because I do not know

Re: [sqlite] Encryption of sqlite DB

2010-05-04 Thread Timothy A. Sawyer
This really depends on what you are trying to protect. Passwords are the common data pieces that would be protected in this manner. The easiest way to encrypt a specific row is to put the data through some sort of one way hash function before you write the data to the table. However since this is

Re: [sqlite] Encryption of sqlite DB

2010-05-04 Thread Swithun Crowe
Hello KR> What’s the simplest way to encrypt only certain rows in an sqlite DB? KR> If there is no way to do this (for storing passwords etc), I would KR> like to know the best way to encrypt the whole sqlite DB. (Prefer only KR> encrypting some rows, but if this introduces complexity, I’m will

Re: [sqlite] Encryption of sqlite DB

2010-05-04 Thread P Kishor
On Tue, May 4, 2010 at 11:19 AM, Kavita Raghunathan wrote: > Hi, > What’s the simplest way to encrypt only certain rows in an sqlite DB? If > there is no way to do this (for storing passwords etc), You certainly mean some or all columns in all the rows, don't you? Well, no matter -- you can encr

Re: [sqlite] Encryption of sqlite DB

2010-05-04 Thread Stephan Wehner
On Tue, May 4, 2010 at 9:19 AM, Kavita Raghunathan wrote: > Hi, > What’s the simplest way to encrypt only certain rows in an sqlite DB? If > there is no way to do this (for storing passwords etc), I would like to know > the best way to encrypt the whole sqlite DB. (Prefer only encrypting some >

[sqlite] Encryption of sqlite DB

2010-05-04 Thread Kavita Raghunathan
Hi, What’s the simplest way to encrypt only certain rows in an sqlite DB? If there is no way to do this (for storing passwords etc), I would like to know the best way to encrypt the whole sqlite DB. (Prefer only encrypting some rows, but if this introduces complexity, I’m willing to encrypt the

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-04 Thread Gilles Ganault
On Mon, 3 May 2010 00:39:37 +0400, Alexey Pechnikov wrote: >it's easy for TCL developers. You may build tclsqlite+tclhttpd+your >tcl scripts as starpack (single executable binary). For integrate >SQLite database into starpack use this extension: >http://www.siftsoft.com/tclsqlitevfs.html Thanks.

Re: [sqlite] Proposed new sqlite3_open_v3() interface

2010-05-04 Thread Jay A. Kreibich
On Tue, May 04, 2010 at 08:17:11AM +0100, Ben scratched on the wall: > Also, is there any information on the newer format for curious users? > I can only see a single paragraph on it at: > http://www.sqlite.org/compile.html That's all there is to it. v4 added a different encoding for integer

Re: [sqlite] Proposed new sqlite3_open_v3() interface

2010-05-04 Thread Richard Hipp
On Tue, May 4, 2010 at 3:17 AM, Ben wrote: > > On 3 May 2010, at 15:47, D. Richard Hipp wrote: > > Community feedback is requested for the following proposed new SQLite > > C API: > > > >int sqlite3_open_v3(const char*, sqlite3**, int, const char*); > > > > ... > > > > > (3) The default datab

Re: [sqlite] Proposed new sqlite3_open_v3() interface

2010-05-04 Thread Ben
On 3 May 2010, at 15:47, D. Richard Hipp wrote: > Community feedback is requested for the following proposed new SQLite > C API: > >int sqlite3_open_v3(const char*, sqlite3**, int, const char*); > > ... > > (3) The default database file format would be format 4 (meaning that > new data