W3C home > Mailing lists > Public > public-html@w3.org > February 2008

Re: Type conversion in the Database API in 4.11

From: Kornel Lesiński <kornel@geekhood.net>
Date: Thu, 28 Feb 2008 15:28:17 +0000
Message-Id: <ABFA8F2E-4BE7-4646-BEA8-96490214296E@geekhood.net>
Cc: public-html@w3.org
To: <mikko.honkala@nokia.com> <mikko.honkala@nokia.com>


On 28 Feb 2008, at 14:42, <mikko.honkala@nokia.com>  
<mikko.honkala@nokia.com> wrote:
>
> My ECMAScript-specific proposal would be to preserve ECMAScript  
> numbers
> (64-bit double) and booleans, and treat the rest as strings.

Don't forget about NULLs. JavaScript does have a special null object.

Because booleans are not supported uniformly across databases, I  
think the definition how booleans are handled should be very  
permissive, e.g. anything that evaluates to true in JS should be cast  
to true in the DB and vice-versa, i.e.
database must not return false as string like "F", because it would  
evaluate to true in JS, but could return and accept true/false as 1/0  
or "T" and "".

-- 
regards, Kornel
Received on Thursday, 28 February 2008 15:29:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:53 UTC