Re: [sqlite] Transaction within script

2009-01-02 Thread Richard Klein
D. Richard Hipp wrote: > ... nested transactions (in the form of SAVEPOINTs) will appear in > the next SQLite release, which we hope to get out by mid-January ... > Nice! I'm hoping you will also provide a SQLITE_OMIT_SAVEPOINT compilation option, for us embedded guys who are always worrying

Re: [sqlite] Delete Trigger on INSERT OR REPLACE?

2009-01-02 Thread schachtobi
Hi Jay, thank you for your quick answer. I will now probably code the insert or replace by myself using the delete. To solve this is in my application not a big issue, but I like referential integrity. /Tobias Jay A. Kreibich schrieb: > That's the documented behavior: >

Re: [sqlite] Delete Trigger on INSERT OR REPLACE?

2009-01-02 Thread Martin Engelschalk
Hello Tobi, i did not mean to say rtfm, but wanted to add my own question. Thanks for answering it. Martin schachtobi wrote: > Hello Martin, > > wow 7 Minutes to scan the manual. Yes I know RTFM :o > > The update trigger is not issued if this test is correct here: > > sqlite> create trigger fku

Re: [sqlite] Delete Trigger on INSERT OR REPLACE?

2009-01-02 Thread schachtobi
Hello Martin, wow 7 Minutes to scan the manual. Yes I know RTFM :o The update trigger is not issued if this test is correct here: sqlite> create trigger fku before update on ch for each row begin delete from blobdata where chId=old.id; end; sqlite> select fname from ch limit 1;

Re: [sqlite] Delete Trigger on INSERT OR REPLACE?

2009-01-02 Thread Jay A. Kreibich
On Fri, Jan 02, 2009 at 11:38:38PM +0100, schachtobi scratched on the wall: > Hello, > > i have a question. In my application I issue an insert or replace > operation. It seems that the delete trigger is not executed here. That's the documented behavior:

Re: [sqlite] Delete Trigger on INSERT OR REPLACE?

2009-01-02 Thread Martin Engelschalk
Hello Tobi, See http://www.sqlite.org/lang_conflict.html, near the bottom: "When this conflict resolution strategy deletes rows in order to satisfy a constraint, it does not invoke delete triggers on those rows. This behavior might change in a future release." I would be interested if an

Re: [sqlite] Inserting an image file?

2009-01-02 Thread schachtobi
Hello, I have an open source application using that. You can look at the complete source here: http://getamosaic.svn.sourceforge.net/viewvc/getamosaic/trunk/GetAMosaic/dbAccess.c?revision=28=markup Method name: dbAddCharacteristicWData regards, Tobias aditya siram schrieb: > How do I insert

[sqlite] Delete Trigger on INSERT OR REPLACE?

2009-01-02 Thread schachtobi
Hello, i have a question. In my application I issue an insert or replace operation. It seems that the delete trigger is not executed here. Is there a special replace trigger? Thanks for your help. regards, Tobias Here my Session: sqlite> select * from ch; 1|100_4664.JPG|103|94|98|64

Re: [sqlite] Inserting an image file?

2009-01-02 Thread Igor Tandetnik
"aditya siram" wrote in message news:594f78210901021108o6cbdfbddxe6b80631fe3da...@mail.gmail.com > How do I insert an image file into sqlite table? Can I just use a > path-specifier? For instance, > create table ("name" varchar, "data" blob); > insert into table

[sqlite] Inserting an image file?

2009-01-02 Thread aditya siram
Hi all, How do I insert an image file into sqlite table? Can I just use a path-specifier? For instance, create table ("name" varchar, "data" blob); insert into table ("someBlob", "./blob.jpg"); thanks, deech ___ sqlite-users mailing list

Re: [sqlite] nested transactions

2009-01-02 Thread Brad Stiles
> This will be a point release: 3.6.8. There are no > incompatibilities. An important aspect of our social contract is > that SQLite continues to be compatible moving forward. There are > hundreds of millions of SQLite3 databases in the world, and we do > not want to abandon them. Software

Re: [sqlite] Transaction within script

2009-01-02 Thread Ken
DRH, The thing that confuses me is the concept of "TRANSACTION stack" vs a transaction. I believe what your trying to say is there is still only one transaction but there are multiple savepoints that are implemented via a stack. And the transaction is either commited or rolled back. Savepoints

Re: [sqlite] looking for data entry screen suggestions

2009-01-02 Thread Ken
Maybe try googling something java based or embedded in a browser. Hth --- On Fri, 1/2/09, Alan Cohen wrote: > From: Alan Cohen > Subject: [sqlite] looking for data entry screen suggestions > To: sqlite-users@sqlite.org > Date: Friday, January 2,

Re: [sqlite] Transaction within script

2009-01-02 Thread Igor Tandetnik
"D. Richard Hipp" wrote in message news:3636c9a5-2c49-42f8-ab43-77168862c...@hwaci.com > On Jan 2, 2009, at 10:56 AM, Igor Tandetnik wrote: >> Describing the effects of RELEASE statement as committing a savepoint >> may be somewhat misleading. How can one commit some changes in

[sqlite] looking for data entry screen suggestions

2009-01-02 Thread Alan Cohen
I'm a relatively new SQLite user and I'm not much of a programmer, although I have used several database GUI Tools over the years, including code generators on PickOS and Windows. I've been able to extract my data from Palm Desktop (twelve years of accumulation), build tables and import my data

Re: [sqlite] Transaction within script

2009-01-02 Thread D. Richard Hipp
On Jan 2, 2009, at 10:56 AM, Igor Tandetnik wrote: > "D. Richard Hipp" wrote > in message news:ff9afacd-4cde-4d66-a15f-3b9226df0...@hwaci.com >> Preliminary documentation can be seen at >> http://www.sqlite.org/draft/lang_savepoint.html > > Describing the effects of RELEASE

Re: [sqlite] Transaction within script

2009-01-02 Thread Ken
Igor, Yup I was a bit confused too. I think of savepoints as a "mark" within the journal. Then a rollback simply applies the undo backwards to that "mark". Releasing a savepoint as you stated removes the "mark". Only commit or rollback can actually modify the data. Savepoint/Release are

Re: [sqlite] Transaction within script

2009-01-02 Thread Ken
Savepoints are not the same as an autonomous transaction. Could that be what he really means by "nested transactions"? Thanks for implementing savepoints they are a welcome addition to SQLITE ! --- On Fri, 1/2/09, D. Richard Hipp wrote: > From: D. Richard Hipp

Re: [sqlite] Transaction within script

2009-01-02 Thread Igor Tandetnik
"D. Richard Hipp" wrote in message news:ff9afacd-4cde-4d66-a15f-3b9226df0...@hwaci.com > Preliminary documentation can be seen at > http://www.sqlite.org/draft/lang_savepoint.html Describing the effects of RELEASE statement as committing a savepoint may be somewhat misleading.

Re: [sqlite] Transaction within script

2009-01-02 Thread D. Richard Hipp
On Jan 2, 2009, at 10:37 AM, Sherief N. Farouk wrote: >> SAVEPOINTs is the way PostgreSQL and MySQL do it, as well as many >> other SQL database engines. We want to maximize compatibility. >> >> We have discussed letting you used named transactions using BEGIN. >> We >> might add that in the

Re: [sqlite] Transaction within script

2009-01-02 Thread Sherief N. Farouk
> SAVEPOINTs is the way PostgreSQL and MySQL do it, as well as many > other SQL database engines. We want to maximize compatibility. > > We have discussed letting you used named transactions using BEGIN. We > might add that in the future. But for now, SAVEPOINT seems to be the > safest way to

Re: [sqlite] Transaction within script

2009-01-02 Thread Alexey Pechnikov
Hello! В сообщении от Friday 02 January 2009 18:26:56 Sherief N. Farouk написал(а): > > Preliminary documentation can be seen at > > http://www.sqlite.org/draft/lang_savepoint.html > > Why savepoints? Why not just add support for named transactions? Is there > some semantic difference I'm

Re: [sqlite] Transaction within script

2009-01-02 Thread D. Richard Hipp
On Jan 2, 2009, at 10:26 AM, Sherief N. Farouk wrote: >> Preliminary documentation can be seen at >> http://www.sqlite.org/draft/lang_savepoint.html > > > Why savepoints? Why not just add support for named transactions? Is > there > some semantic difference I'm missing? SAVEPOINTs is the way

Re: [sqlite] Creating Histogram fast and efficiently :)

2009-01-02 Thread Ribeiro, Glauber
If the data were small I'd do a case statement, otherwise, create a table with the ranges and join that to your main table. g -Original Message- From: Jonathon [mailto:thejunk...@gmail.com] Sent: Wednesday, December 31, 2008 5:16 AM To: General Discussion of SQLite Database Subject:

Re: [sqlite] Transaction within script

2009-01-02 Thread Sherief N. Farouk
> Preliminary documentation can be seen at > http://www.sqlite.org/draft/lang_savepoint.html Why savepoints? Why not just add support for named transactions? Is there some semantic difference I'm missing? - Sherief ___ sqlite-users mailing list

Re: [sqlite] Transaction within script

2009-01-02 Thread D. Richard Hipp
On Jan 2, 2009, at 7:32 AM, D. Richard Hipp wrote: > > On Jan 2, 2009, at 3:50 AM, Marco Bambini wrote: > >> Is there any documentation available about savepoints? > > Not yet, but there will be soon... Preliminary documentation can be seen at http://www.sqlite.org/draft/lang_savepoint.html

Re: [sqlite] Transaction within script

2009-01-02 Thread D. Richard Hipp
On Jan 2, 2009, at 3:50 AM, Marco Bambini wrote: > Is there any documentation available about savepoints? Not yet, but there will be soon, and definitely before the release. Meanwhile, you can use the SAVEPOINT documentation from PostgreSQL. SAVEPOINTs in SQLite should work exactly the same

Re: [sqlite] nested transactions

2009-01-02 Thread D. Richard Hipp
On Jan 2, 2009, at 12:28 AM, Chris Wedgwood wrote: > On Thu, Jan 01, 2009 at 08:19:01PM -0500, D. Richard Hipp wrote: > >> FWIW, nested transactions (in the form of SAVEPOINTs) will appear in >> the next SQLite release, which we hope to get out by mid-January. > > Is that going to be 4.0.x then?

Re: [sqlite] Transaction within script

2009-01-02 Thread Marco Bambini
Is there any documentation available about savepoints? -- Marco Bambini http://www.sqlabs.net http://www.sqlabs.net/blog/ http://www.sqlabs.net/realsqlserver/ On Jan 2, 2009, at 2:19 AM, D. Richard Hipp wrote: > > On Jan 1, 2009, at 7:25 PM, Igor Tandetnik wrote: > >> "Webb Sprague"