| 1 | .import QtQuick.LocalStorage 2.0 as Sql |
| 2 | |
| 3 | function test() { |
| 4 | var r="transaction_not_finished"; |
| 5 | var db = Sql.LocalStorage.openDatabaseSync("QmlTestDB-creation", "1.0", "Test database from Qt autotests", 1000000); |
| 6 | db.transaction( |
| 7 | function(tx) { |
| 8 | tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); |
| 9 | tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); |
| 10 | r = "passed"; |
| 11 | } |
| 12 | ); |
| 13 | |
| 14 | return r; |
| 15 | } |