Hi everyone,
    Now the discussion has deviated from my original question.  But the topic 
is interesting.

    We also access SQLite from javascript (through MOZILLA's firefox codebase). 
 Mozilla has a set of XPCOM components that allow easy Javscript access to 
SQLite (firefox uses SQLite for its internal use).  We have a javascript 
wrapper on top of their interface to make them easy to use.  It was looking 
through the Mozilla components we noticed that there was no stored procedure at 
all, hence the original question.  Our product - Jaxer - is open source, and we 
are releasing 1.0 RC today or tomorrow.  If you are interested in how we access 
SQLite from javascript, you can download Jaxer free (from http://aptana.com/), 
and the SQLite APIs are wrapped in ServerFramework.js.

Thanks,
John

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Stanton
Sent: Tuesday, July 29, 2008 4:16 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Does sqlite support stored procedure?

I wrote an Sqlite module which links into Spidermonkey and connects to
Sqlite using the Sqlite API.

Stephen Woodbridge wrote:
> John Stanton wrote:
>
>>Adding Javascript to Sqlite as a stored procedure language was a fairly
>>simple operation.  Try it if you need stored procedures.
>
>
> This sounds really interesting.
>
> How to you make access to the sqlite3 api in javascript? Would you need
> to? Seems like you would need to at least provide some interface to the
> DB functions so you can do things like INSERT, UPDATE, DELETE, SELECT,
> and step through the results, etc.
>
> -Steve
>
>
>>BareFeet wrote:
>>
>>>Hi John,
>>>
>>>
>>>
>>>>I would like to know if SQLite supports stored procedures.
>>>
>>>Technically, no it doesn't.
>>>
>>>For what purpose do you want to store procedures?
>>>
>>>You can store some procedures in triggers, if you want to have SQLite
>>>trigger a task when some data is changed.
>>>
>>>You can simply create a "Procedures" table like this:
>>>
>>>create table "Procedures" (Name, SQL);
>>>
>>>and populate it with SQL procedures. You can call those procedures
>>>later from within your program and sqlite3 command line and execute
>>>them.
>>>
>>>Tom
>>>BareFeet
>>>
>>>  --
>>>Comparison of SQLite GUI applications:
>>>http://www.tandb.com.au/sqlite/compare/
>>>
>>>_______________________________________________
>>>sqlite-users mailing list
>>>sqlite-users@sqlite.org
>>>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/listinfo/sqlite-users
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> 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/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to