diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativesqldatabase/data/creation.js')
-rw-r--r-- | tests/auto/declarative/qdeclarativesqldatabase/data/creation.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/creation.js b/tests/auto/declarative/qdeclarativesqldatabase/data/creation.js new file mode 100644 index 0000000..317b4c1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativesqldatabase/data/creation.js @@ -0,0 +1,14 @@ +function test() { + var r="transaction_not_finished"; + var db = openDatabaseSync("QmlTestDB-creation", "1.0", "Test database from Qt autotests", 1000000); + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + r = "passed"; + } + ); + + return r; +} |