[whatwg] SQL API and Transactions

Aaron Boodman aa at google.com
Thu Nov 1 10:05:26 PDT 2007


On 11/1/07, Scott Hess <shess at google.com> wrote:
> Hmm.  Is this because we're allowing for what SQLite calls BEGIN
> DEFERRED, rather than requiring BEGIN IMMEDIATE?  [I'm basing this on
> error code 5.]  In that case, yes, the above won't work.  I'd like to
> argue that BEGIN IMMEDIATE should be required, but I don't think
> that's at all portable.

I think most (all?) databases have some equiv of BEGIN IMMEDIATE.
Also, I'm thinking more and more that the standard should take a
firmer hand.

I haven't written this up yet, but something like explicitly only
allowing the SELECT,INSERT,UPDATE,DELETE statements. For creating
schema, you could have API that defines in terms of the standard DOM
datatypes (eg DOMString).

It would be up to the implementation to figure out what these
definitions mean in terms of the native types. I think in SQLite at
least, the conversion would be pretty straightforward. Seems like it
would give some flexibility to the other dbs and give a real shot at
interoperability as well.

- a



More information about the whatwg mailing list