aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlsqldatabase/data/reopen2.js
blob: 12c6135145de8ae993a579ca7216e6e20fc341a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.import QtQuick.LocalStorage 2.0 as Sql

function test() {
    var r="transaction_not_finished";
    var db = Sql.openDatabaseSync("QmlTestDB-reopen", "1.0", "Test database from Qt autotests", 1000000);

    db.transaction(
        function(tx) {
            var rs = tx.executeSql('SELECT * FROM Greeting');
            if (rs.rows.item(0).salutation == 'hello')
                r = "passed";
            else
                r = "FAILED";
        }
    );

    return r;
}