Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-20 Thread Hick Gunter
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Clemens Ladisch Gesendet: Donnerstag, 20. April 2017 09:38 An: sqlite-users@mailinglists.sqlite.org Betreff: Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite? Olivier Mascia wrote: &

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-20 Thread Clemens Ladisch
Olivier Mascia wrote: > As far as I understood, SQLite will parse and compile the trigger text > as part of each statement using them. No bytecode compilation upfront, > nor storage of it. SQLite parses all triggers (and all other schema objects) when it reads the schema (see "struct Trigger"

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-20 Thread Olivier Mascia
> Le 20 avr. 2017 à 01:13, petern a écrit : > > 2. Here is a question. It would be helpful to know if TRIGGERs are stored > as prepared SQLite byte code or not. What does the SQLite engine do > exactly? Anybody? I'm answering to test my understanding, confronting

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread petern
1. Forgot to mention. In cases where the WHEN clause is not convenient for trigger style stored procedure condition branching there is also "SELECT raise(ignore) WHERE ": https://sqlite.org/lang_createtrigger.html#raise 2. Here is a question. It would be helpful to know if TRIGGERs are stored

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread R Smith
On 2017/04/19 6:58 PM, James K. Lowden wrote: On Sun, 16 Apr 2017 12:01:01 +0200 Darko Volaric wrote: There are good reasons to have stored procedures other than reducing connection latency - developers like to encapsulate logic that is associated entirely with the database

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread Simon Slavin
On 19 Apr 2017, at 8:59pm, Domingo Alvarez Duarte wrote: > > What I understood looking at the sqlite3 sources is that an update is always > 3 operations: > > 1- Read old row > > 2- Delete old row > > 3- Insert updated row > > So I seems that using "insert" would be less

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread Domingo Alvarez Duarte
Hello ! What I understood looking at the sqlite3 sources is that an update is always 3 operations: 1- Read old row 2- Delete old row 3- Insert updated row So I seems that using "insert" would be less work. Cheers ! On 19/04/17 16:27, Simon Slavin wrote: On 19 Apr 2017, at 7:47pm,

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread Simon Slavin
On 19 Apr 2017, at 7:47pm, no...@null.net wrote: > I use > triggers quite heavily as a kind of stored procedure. > > Instead of basing them on views however I use real tables and AFTER > INSERT triggers whose final statement deletes the NEW row just > inserted. > > I see two benefits to the

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread nomad
On Wed Apr 19, 2017 at 09:53:07AM -0700, petern wrote: > My sense from these replies is that nobody bothers to try using > triggers to store their SQLite procedural code within the DB. I was > skeptical when I first learned of the technique but the trigger > syntax is very computationally

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread James K. Lowden
On Sun, 16 Apr 2017 12:01:01 +0200 Darko Volaric wrote: > There are good reasons to have stored procedures other than reducing > connection latency - developers like to encapsulate logic that is > associated entirely with the database in the database, use them to do > extended

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread petern
ning event just a single >> row set would be fine. >> >> >> >> On 16/04/2017 2:18 AM, Richard Hipp wrote: >> >>> On 4/15/17, Manoj Sengottuvel <smanoj...@gmail.com> wrote: >>> >>>> Hi Richard, >>>> >>>>

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread Domingo Alvarez Duarte
i Richard, Is it possible to create the Stored Procedure (SP) in Sqlite? if not , is there any alternate way for SP? Short answer: No. Longer answer: With SQLite, your application is the stored procedure. In a traditional client/server database like PostgreSQL or Oracle or SQL Server, ev

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-19 Thread Philip Warner
ichard, Is it possible to create the Stored Procedure (SP) in Sqlite? if not , is there any alternate way for SP? Short answer: No. Longer answer: With SQLite, your application is the stored procedure. In a traditional client/server database like PostgreSQL or Oracle or SQL Server, every SQL sta

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-16 Thread Simon Slavin
On 16 Apr 2017, at 5:27pm, Jens Alfke wrote: > Is this list archived anywhere convenient? I just google for posts I remember and google usually turns up an archive of this list. googling "sqlite stored procedure latency" turns up

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-16 Thread Jens Alfke
> On Apr 15, 2017, at 2:17 PM, Simon Slavin wrote: > > I do agree that DRH’s explanation of why it’s not as important in SQLite as > in client/server engines is well written. We can point to it when we need it. Is this list archived anywhere convenient? Last time I

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-16 Thread Tim Streater
On 15 Apr 2017 at 22:17, Simon Slavin wrote: > On 15 Apr 2017, at 9:14pm, petern wrote: > >> Yes, please include it in the FAQ > > It’s not a FAQ. Not on this list, at least. I would argue against it. Well he meant on the sqlite website.

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-16 Thread Darko Volaric
bases, for instance. > On Apr 15, 2017, at 3:57 PM, Manoj Sengottuvel <smanoj...@gmail.com> wrote: > > Hi Richard, > > Is it possible to create the Stored Procedure (SP) in Sqlite? > > if not , is there any alternate way for SP? > > > regards > Manoj >

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-15 Thread Simon Slavin
On 15 Apr 2017, at 9:14pm, petern wrote: > Yes, please include it in the FAQ It’s not a FAQ. Not on this list, at least. I would argue against it. I do agree that DRH’s explanation of why it’s not as important in SQLite as in client/server engines is well

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-15 Thread petern
4/15/2017 06:18 PM, Richard Hipp wrote: > >> On 4/15/17, Manoj Sengottuvel <smanoj...@gmail.com> wrote: >> >>> Hi Richard, >>> >>> Is it possible to create the Stored Procedure (SP) in Sqlite? >>> >>> if not , is there any alternate

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-15 Thread Christian Werner
On 04/15/2017 06:18 PM, Richard Hipp wrote: On 4/15/17, Manoj Sengottuvel <smanoj...@gmail.com> wrote: Hi Richard, Is it possible to create the Stored Procedure (SP) in Sqlite? if not , is there any alternate way for SP? Short answer: No. Longer answer: With SQLite, your appli

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-15 Thread Richard Hipp
On 4/15/17, Manoj Sengottuvel <smanoj...@gmail.com> wrote: > Hi Richard, > > Is it possible to create the Stored Procedure (SP) in Sqlite? > > if not , is there any alternate way for SP? Short answer: No. Longer answer: With SQLite, your application is the stored proced

[sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-15 Thread Manoj Sengottuvel
Hi Richard, Is it possible to create the Stored Procedure (SP) in Sqlite? if not , is there any alternate way for SP? regards Manoj ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman