summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js
blob: bd7d5c50227b59033a7ed46bb051bf135642572f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function test() {
    var r="transaction_not_finished";

    var db = openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000,
            function(db) {
                db.transaction(function(tx){
                    tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)');
                    r = "passed";
                })
            });

    var db = openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000,
            function(db) {
                r = "FAILED: should have already been created";
            });

    return r;
}