diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-23 23:17:06 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-23 23:17:06 (GMT) |
commit | 31540e4b5177073d71b98e296ad7d59faf63b383 (patch) | |
tree | 6eaf3e50b1a351171db3d47b8e39e0ee7478bc54 /tests/auto/declarative/sql/data/selection.js | |
parent | 7d93b0762aff8bcd9cb22f12ebc88beb242f2a97 (diff) | |
parent | 8d263b7cbf6b0bd17deeb8b56c90e0232057b832 (diff) | |
download | Qt-31540e4b5177073d71b98e296ad7d59faf63b383.zip Qt-31540e4b5177073d71b98e296ad7d59faf63b383.tar.gz Qt-31540e4b5177073d71b98e296ad7d59faf63b383.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative/sql/data/selection.js')
-rw-r--r-- | tests/auto/declarative/sql/data/selection.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/declarative/sql/data/selection.js b/tests/auto/declarative/sql/data/selection.js new file mode 100644 index 0000000..f116eff --- /dev/null +++ b/tests/auto/declarative/sql/data/selection.js @@ -0,0 +1,26 @@ +function test() { + var db = openDatabaseSync("QmlTestDB-selection", "", "Test database from Qt autotests", 1000000); + var r="transaction_not_finished"; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + } + ); + + db.transaction( + function(tx) { + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + var rs = tx.executeSql('SELECT * FROM Greeting'); + if ( rs.rows.length != 4 ) + r = "SELECT RETURNED WRONG VALUE "+rs.rows.length+rs.rows[0]+rs.rows[1] + else + r = "passed"; + } + ); + + return r; +} |