W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

[whatwg] executeSql shouldn't have variable length arguments

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 17 Oct 2007 07:08:57 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0710170618550.19595@hixie.dreamhostps.com>
On Fri, 5 Oct 2007, Aaron Boodman wrote:
>
> Scott just pointed out to me that the current spec has executeSql taking 
> a variable number of arguments:
> 
> http://www.whatwg.org/specs/web-apps/current-work/#executesql
> 
> We tried this in Gears at first, but learned quickly that it was a huge 
> pain to work with. Dealing with the arguments collection in javascript 
> is very painful, so we ended up just passing arrays around and 
> converting them to the variable length at the last minute.
> 
> Summary: variable length arguments seem cute at first, but end up being 
> more pain that they are worth.

Fixed.


On Fri, 5 Oct 2007, Aaron Boodman wrote:
>
> To clarify, my proposed alternative is that the second argument should 
> just be an array:
> 
> executeSql(sql, ["foo", "bar", "baz"], callback);

Right.


On Fri, 5 Oct 2007, Scott Hess wrote:
>
> Also, in case of no bind arguments, Gears allows the parameter to be 
> either empty or null or omitted (that not being an option in this case).

null is longer than [], so I haven't put in any special text for null.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 17 October 2007 00:08:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC