Re: [sqlite] Implementing "Save As..." functionality for Application File Format usecase

2013-04-03 Thread Stephen Chrzanowski
Personally, I only use transactions when I'm doing inserts, updates, and deletes for one or more records. I never keep a transaction open for longer than I need to make changes to the database. What I would suggest is scrap the idea of keeping a transaction open at all times, but work off of a

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Yongil Jang
Thank you, J. and Keith! 2013/4/4 Keith Medcalf > > http://xkcd.com/327/ > > --- > () ascii ribbon campaign against html e-mail > /\ www.asciiribbon.org > > > > -Original Message- > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > >

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Keith Medcalf
http://xkcd.com/327/ --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of j.merr...@enlyton.com > Sent: Wednesday, 03 April, 2013 17:17 > To:

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread j . merrill
The people who are using your software need a lesson about "SQL injection". No one should create SQL statements "on the fly" that include literal character strings built from data. Not only could there be issues if there are special characters in the data to be included as a literal string

Re: [sqlite] Implementing "Save As..." functionality for Application File Format usecase

2013-04-03 Thread Nico Williams
On Wed, Apr 3, 2013 at 5:08 PM, Simon Slavin wrote: > On 3 Apr 2013, at 10:52pm, Nico Williams wrote: >> As a user I prefer continuous saving + infinite undo. > > Undo is difficult with SQLite. For instance, to undo an UPDATE command you > need to

Re: [sqlite] Implementing "Save As..." functionality for Application File Format usecase

2013-04-03 Thread Simon Slavin
On 3 Apr 2013, at 10:52pm, Nico Williams wrote: > As a user I prefer continuous saving + infinite undo. Undo is difficult with SQLite. For instance, to undo an UPDATE command you need to know the original values of all the fields updated, which may be different in

Re: [sqlite] How to achieve fastest possible write performance for a strange and limited case

2013-04-03 Thread Rob Sciuk
I'm not sure exactly what you're asking here, but if the question is whether to use database blobs vs files, then you might be interested in this technical report from Microsoft: arxiv.org/ftp/cs/papers/0701/0701168.pdf --

Re: [sqlite] Implementing "Save As..." functionality for Application File Format usecase

2013-04-03 Thread Nico Williams
As a user I prefer continuous saving + infinite undo. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Implementing "Save As..." functionality for Application File Format usecase

2013-04-03 Thread Nico Williams
On Wed, Apr 3, 2013 at 4:11 PM, Tiago Rodrigues wrote: > I'm writing a small simulation app and for it I would like to use SQLite3 > as an application file format, as suggested by the "Appropriate uses for > SQLite" page in sqlite.org. More specifically, the page suggests

[sqlite] Implementing "Save As..." functionality for Application File Format usecase

2013-04-03 Thread Tiago Rodrigues
Hello all, I'm writing a small simulation app and for it I would like to use SQLite3 as an application file format, as suggested by the "Appropriate uses for SQLite" page in sqlite.org. More specifically, the page suggests calling BEGIN TRANSACTION when opening a file and calling COMMIT when

Re: [sqlite] Bug or some misunderstanding?

2013-04-03 Thread Dominique Devienne
On Wed, Apr 3, 2013 at 1:54 AM, Support wrote: > Hi > I have a database which has an entry "USE" in a table called airports with > column LocationID. > When I call > sqlite3 -line ~/Desktop/maps.db 'select * from airports where LocationID > like "USE%";' > I get correct

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Yongil Jang
Thank you, Simon and Igor. I will investigate about your opinion, as you mentioned. In general, if parameter string contains alphabets only, it doesn't make any problems. However, I couldn't check that my function is used correctly for every applications. Some developers don't know why does it

Re: [sqlite] Bug or some misunderstanding?

2013-04-03 Thread Jay A. Kreibich
On Wed, Apr 03, 2013 at 02:28:07PM +0200, Dominique Devienne scratched on the wall: > On Wed, Apr 3, 2013 at 1:54 AM, Support wrote: > > > sqlite3 -line ~/Desktop/maps.db 'select * from airports where LocationID > > like "USE%";' > > I get correct result. > > > > But when I

Re: [sqlite] New Optimizations in 3.7.16 -- Explain please?

2013-04-03 Thread Patrick Herbst
> Can someone give me a case where the new changes make a difference in > relation to the following two changes: > > (from http://www.sqlite.org/releaselog/3_7_16.html) > - Enhance virtual tables so that they can potentially use an index > when the WHERE clause contains the IN operator. > - Allow

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Igor Tandetnik
On 4/3/2013 8:58 AM, Yongil Jang wrote: For more information, I just made some functions that handling files path. But, if file name includes "Special characters(ex: '"') " or "Unicode" and it is used for myFunc() then it makes "Syntax error" error code and execution is failed. What I want to do

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Simon Slavin
On 3 Apr 2013, at 2:08pm, Yongil Jang wrote: > Thank you! > > I may need to make plan B. Create a third parameter that tells your function what to do. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Yongil Jang
Thank you! I may need to make plan B. 2013. 4. 3. 오후 10:04에 "Richard Hipp" 님이 작성: > On Wed, Apr 3, 2013 at 8:58 AM, Yongil Jang wrote: > > > Is there any way that I can recognize there arguments are generated from > > dynamic binding (ex: "?") or static

Re: [sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Richard Hipp
On Wed, Apr 3, 2013 at 8:58 AM, Yongil Jang wrote: > Is there any way that I can recognize there arguments are generated from > dynamic binding (ex: "?") or static string? > No. Applications-defined functions are call-by-value, as in C. If you have a C function, you

[sqlite] [Question] How can I recognize arguments are dynamic binding values in user defined function?

2013-04-03 Thread Yongil Jang
Hello, I have a question about user defined function. When I make user defined function, that function has argument count and values only. Is there any way that I can recognize there arguments are generated from dynamic binding (ex: "?") or static string? For following examples, there are two

Re: [sqlite] Bug or some misunderstanding?

2013-04-03 Thread Richard Hipp
On Tue, Apr 2, 2013 at 7:54 PM, Support wrote: > Hi > I have a database which has an entry "USE" in a table called airports with > column LocationID. > When I call > sqlite3 -line ~/Desktop/maps.db 'select * from airports where LocationID > like "USE%";' > I get correct

Re: [sqlite] Bug or some misunderstanding?

2013-04-03 Thread Dominique Devienne
On Wed, Apr 3, 2013 at 1:54 AM, Support wrote: > sqlite3 -line ~/Desktop/maps.db 'select * from airports where LocationID > like "USE%";' > I get correct result. > > But when I call > sqlite3 -line ~/Desktop/maps.db 'select * from airports where > LocationID=="USE";' > SQL

Re: [sqlite] Bug or some misunderstanding?

2013-04-03 Thread Donald Griggs
Hello, "Z", Have you made sure you don't have a trailing space or other invisible character at the end of the field? As a first step, you might try a query such as the following: * select '(' || LocationID || ')' , *from airports where LocationID like 'USE%'* Maybe this helps,

Re: [sqlite] TCL Test failures on ARM

2013-04-03 Thread Bk
Hi, Thank you all for the reply. i am still wondering why setting DSQLITE_DISABLE_LFS=1 had no effect on the code when we have a clear #ifndef ? , 1) if my application does not need LFS , how do i really make it here (system uses : Linux nitrogen6x 3.0.15-ts-armv7l) ? i was getting

[sqlite] Bug or some misunderstanding?

2013-04-03 Thread Support
Hi I have a database which has an entry "USE" in a table called airports with column LocationID. When I call sqlite3 -line ~/Desktop/maps.db 'select * from airports where LocationID like "USE%";' I get correct result. But when I call sqlite3 -line ~/Desktop/maps.db 'select * from airports