[whatwg] Database storage API and argument type conversion

It would be "a good thing" to specify some standard way to convert
argument types for the executeSql call. This question was first raised
on public-html list
(http://lists.w3.org/Archives/Public/public-html/2008Feb/0401.html),
suggesting that the types, not directly supported by the database
engine (SQLite seems to be the logical choice) are treated as strings.

In other words, if the type of the argument is not null, string,
double, or int, the argument is implicitly converted to to string.

As an alternative, I would like to present a slightly different
approach: if, during step 3 of the executeSql algorithm
(http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html#executing),
an argument is found to be unpalatable for the underlying database
implementation, the statement is marked bogus.

Though a bit more stringent than the implicit conversion, this
approach explicitly prevents any subtle coercion bugs and will
probably lead to more debuggable code.

What are your thoughts on this, oh wise WHATWG oracle?

:DG<

Received on Thursday, 10 April 2008 04:32:11 UTC