summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativesqldatabase/data/reopen1.js
blob: c1a8157b10d634fb32d8dd384d52f57710a13bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function test() {
    var r="transaction_not_finished";
    var db = openDatabaseSync("QmlTestDB-reopen", "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;
}