<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Converting an object to a string has a very defined path in JavaScript, toString is called. Perhaps the spec should mention toString.</div><div><br></div><div>Marking the query as bogus seems wrong, since the JavaScript language is very lenient about types and implicit type&nbsp;conversions&nbsp;when needed.&nbsp;Implicit&nbsp;conversion to strings is what any&nbsp;proficient&nbsp;JavaScript author would expect to happen.&nbsp;I don't see any reason to make the storage spec behave differently.</div><div><br></div><div><html>On Apr 10, 2008, at 4:32 AM, Dimitri Glazkov wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">In other words, if the type of the argument is not null, string,<br>double, or int, the argument is implicitly converted to to string.<br><br>As an alternative, I would like to present a slightly different<br>approach: if, during step 3 of the executeSql algorithm<br>(<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html#executing">http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html#executing</a>),<br>an argument is found to be unpalatable for the underlying database<br>implementation, the statement is marked bogus.<br><br>Though a bit more stringent than the implicit conversion, this<br>approach explicitly prevents any subtle coercion bugs and will<br>probably lead to more debuggable code.<br></span></blockquote><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Verdana; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><span class="Apple-style-span" style="font-size: 10px; ">— Timothy Hatcher</span></span></font></div></div><br class="Apple-interchange-newline"></span> </div><br></body></html>