2

I have a few questions that I can't seem to get workable answers to after hanging ten on the internet for an hour and a half, so I figured I would ask them directly.

I want to incorporate some prepared statements into a JavaScript application that is already using SQLite. As far as I understand, if I'm not using prepared statements, my app is suffering unnecessarily. (Correct me if I am wrong.)

Here's the big stumper though, is this something that works in JavaScript. I see very little on the internet that contains SQLite and JavaScript, and even less about JavaScript and prepared statements. I was hoping to use this to speed up the app and validate my statements for troublesome characters such as ". (I'm already validating those, but knocking out an unnecessary validation function would be nice.)

If nothing else, a nice link or comment about what other characters might meddle with me would be helpful. That seems to be hard to find as well.

4

1 回答 1

1

SQLite 的 JavaScript API 不支持预处理语句。

用于从 chrome(即插件)中连接到数据库的 Firefox API 添加了一个executeCached方法,该方法将缓存语句以供重复使用,但这不包括在 Web SQL 数据库规范中,并且在其他任何地方都不可用。

于 2013-08-13T03:58:28.040 回答