This is currently mostly a stub proposal. The basic idea is to allow SQLite to handle named, parameterized queries stored in the db in much the same way that the MS Jet engine does, possibly migrating this to stored proc support at some point.
an example of a stored query might look something like:
Create Query getFooName (:barName) AS Select f.FooName from Foo f inner join Bar b on f.FooID = b.FooID where b.BarName = :barName;
The query should then be executable at the command line by saying:
exec getFooName :barName='Wally the wonder hampster';
or via the C api by passing "EXEC getFooName" to prepare, then binding the relevent placeholders
implementation wise, this would just get crammed into the sqlite_master table something like triggers.
possible mods to the parser: Simplistic blocks (only one query can return results) eg: insert, then select last_insert_id Variable declarations in blocks.
possible api mods: prepare_procedure function