summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/sql/data/5-iteration-iterator.js
blob: ae4fd348a7adc8d9b6f1af41479ed5ed62ba0ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function test() {
    var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000);
    var r="transaction_not_finished";

    db.transaction(
        function(tx) {
            var rs = tx.executeSql('SELECT * FROM Greeting')
            var r1=""
            for(var i in rs.rows)
                r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";"
            if (r1 != "hello, world;hello, world;hello, world;hello, world;")
                r = "SELECTED DATA WRONG: "+r1;
            else
                r = "passed";
        }
    );

    return r;
}