On 7/26/16, John Found <[email protected]> wrote:
> Is it possible to use SQLite, making queries directly in the internal
> virtual machine language, instead of SQL?

No.  Why do you want to do this.  The SQL language is the most
compelling feature of SQLite.  Why abandon it?


>
> Or in another variant, compile the queries in design time, manually optimize
> them (if needed) and then store and call in the program in compiled form?

Years ago, we did a custom version of SQLite for a start-up in which
the SQL was rendered into byte-code at compile-time and stored in the
database.  Then at run-time, the application simply invoked an API
that said essentially "run statement N using the following
parameters".  SQLite would then load the byte code out of the database
file, bind the parameters, and run the statement.

By preparing the SQL to byte-code at compile-time, the whole SQL
parser, query planner, optimizers, and code generator could be omitted
from the build, which saved a lot of code space on the embedded device
where it was to be run.

Limitations were severe.  The byte code varies according to the
database schema and the specific build of SQLite.  So, you could not
change your database schema without recompiling the application.  And
your database file was tied to a specific version of the application
and would not work with a different version.

All this was all a long time ago.  And it was a custom build which was
never ported to the public SQLite source tree.  SQLite does not
currently have that capability.

-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to