Friday 15 February 2013

javascript - Can executeSql take named parameters? -


When executableSQL takes several parameters, then we use question marks:

  Db transaction (work (tx) {var added = new date (); tx.xqux sql ("added to todo, added) value (?,?)", [Tudo text, added on], html5rocks.webdb .onSuccess, html5rocks, Webdb.onError);});   

Can executeSQL take a nominal parameter?

from that:

On November 18, 2010, W3 C announced that the Web SQL Database is an exclusion specification. This is not recommended for web developers to use the technology because there will not be any new updates about this effectively and browser vendors will not be encouraged to support this technology.

See also the bigger warning

but to answer your question: As far as I know: No. You can write a 'cover', though you can replace your own placeholders in place of real values, but I think that will not bother with this.

One more shot in the dark : foo AAAIIK most browsers (as a placeholder) SQLite for its webdatabase implementation and, from the top of my head , SQLite : parametername -form several variations [[[foo ':' bar '], {' baz ':' bat '}]

Edit > I have tried several permutations on this:

  var p = { }; P.aa = todoText; PB = Added; Tx.executeSql ("Include in Toggle (Adjustment, Added) Value (: AA,: BB)", P, ...});   

or:

  tx.executeSql ("(, AA, BB)" ("ADA, BDB)", "{AA": TodoText, "Bb": added on}, ...});   

or:

  tx.executeSQL ("Include in both (added, added) value (@aa, @bb)", { "Aa": TodoText, "bb": added on}, ...});   

or:

  tx.executeSql ("Add to Todo (added, added) value (? Aa, bb)", { "AA": TodoText, "bb": added on}, ...});   

... and many more in Chrome 25; None of these point to the nominal parameter. I can map all the one n th position value to work for n th parameter (or index if you wish) for the parameter.

I am not saying that there is absolutely no way, maybe I could not find the right way to find him or I think that you are out of luck and, then, even Should take me or some other person to work for it, I do not believe in it (because:, as well as deprecated anyway) and maybe it fails in many (most?) Others Browsers will go Honestly: Trying to do this work is a waste of your time.

No comments:

Post a Comment