2 var db = openDatabaseSync("QmlTestDB-iteration-forwardonly", "", "Test database from Qt autotests", 1000000);
3 var r="transaction_not_finished";
7 tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)');
8 tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")');
9 tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")');
15 var rs = tx.executeSql('SELECT * FROM Greeting');
16 rs.forwardOnly = !rs.forwardOnly
18 for(var i = 0; i < rs.rows.length; i++)
19 r1 += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + ";"
20 if (r1 != "hello, world;hello, world;hello, world;hello, world;")
21 if (r1 != "Hello, world;Goodbye, cruel world;")
22 r = "SELECTED DATA WRONG: "+r1;