SQLite Bytecode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLite Bytecode

aUser
Hello

I developed an application-specific query language. Currently, I am
converting a query to a rather difficult SQL statement.

Is it possible (and useful), to generate SQLite bytecode instead of a SQL
statement?
If yes, could someone share some C code as an example, how it could be done?
(F.i. Do I need to hold some locks?)

Best Regards




--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite Bytecode

Richard Hipp-3
On 11/15/17, aUser <[hidden email]> wrote:

> Hello
>
> I developed an application-specific query language. Currently, I am
> converting a query to a rather difficult SQL statement.
>
> Is it possible (and useful), to generate SQLite bytecode instead of a SQL
> statement?
> If yes, could someone share some C code as an example, how it could be done?
> (F.i. Do I need to hold some locks?)
>
> Best Regards
>
>
>
>
> --
> Sent from: http://sqlite.1065341.n5.nabble.com/
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite Bytecode

Richard Hipp-3
In reply to this post by aUser
On 11/15/17, aUser <[hidden email]> wrote:
> Is it possible (and useful), to generate SQLite bytecode instead of a SQL
> statement?

It is neither possible nor useful.  The bytecode changes from one
release to the next - it is not stable. We treasure this design
freedom and will not yield it.  In the current bytecode design, if
arbitrary bytecode (that is to say, bytecode not generated by SQLite
itself) is supplied, then there are many paths that could result in
memory corruption, database corruption, assertion faults, segfaults,
memory leaks, and other bad things.  Adding the extra logic to defend
the bytecode against such problems would slow down SQLite for
everybody, which we are not willing to do.
--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users