On Fri, Mar 19, 2010 at 3:56 PM, D. Richard Hipp <d...@hwaci.com> wrote:
> It doesn't get any cleaner than this.
> Unfortunately, other programming languages require more complex
> syntax.

Except PL/SQL language which is simpler/cleaner in that it lets you
use local or package level variables directly in SQL with absolutely
no special binding syntax required.
Here is the same written as a  PL/SQL anonymous block:

CREATE TABLE table1 (col1 integer, col2 float);
DECLARE
   c1val integer := 123;
   c2val float := 12.34;
BEGIN
   UPDATE table1 SET col1=c1val WHERE col2=c2val;
   COMMIT;
END;

PL/SQL is commercially available for SQLite through StepSqlite
compiler: https://www.metatranz.com/stepsqlite.StepSqlite compiles the
user PL/SQL code directly to a loadable extension or a regular C++
library.
StepSqlite compiled libraries automatically follow SQLite best practices by
A) Preparing all SQL statements anywhere in user code just once when
the library is initialized.
B) Automatically enclosing all SQL statements in single transaction
which continues until COMMIT or ROLLBACK - this works even through any
raised Exceptions a'la Oracle.



> If we've learned one thing over the history of computing it is that
> programmers are notoriously bad at counting parameters and that
> symbolic names tend to be much better at avoiding bugs.
>
> D. Richard Hipp
> d...@hwaci.com

I am fan of Oracle's PL/SQL for some of same reasons and built
StepSqlite as a SQLite ecosystem product to bring this combination of
power and simplicity to SQLite. Its great to have parts of the
approach validated by none other than DRH.

Swapnil Kashikar
i...@metatranz.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to