私は文字通り一日中、Firefox を私の意志に従わせようとしてきました...
が欲しいです :
int c = SELECT COUNT(*) FROM ...
試してみましexecuteAsync({...});
たが、結果がすぐに欲しいので、それは間違ったパラダイムだと思います。(そしてmozIStoragePendingStatement
エラーになります)
var count = 0;
var conn = Services.storage.openDatabase(dbfile); // Will also create the file if it does not exist
let statement = conn.createStatement("SELECT COUNT(*) FROM edges LIMIT 42;");
console.log("columns: " + statement.columnCount); // prints "1";
console.log("col name:" + statement.getColumnName(0)); // is "COUNT(*)"
while (statement.executeStep())
count = statement.row.getResultByIndex(0); // "illegal value"
count = statement.row.getString(0); // "illegal value", too
count = statement.row.COUNT(*); // hahaha. still not working
count = statement.row[0]; // hahaha. "undefinded"
count = statement.row[1]; // hahaha. "undefinded"
}
statement.reset();
基本的には機能しますが、値がわかりません。すべてのステートメント (ループ内のステートメント) の何が問題になっていますか。
ヒントをありがとう...