<commit_before>import Qt 4.6

Text {
    Script {
        function allGreetings()
        {
            var db = openDatabase("QmlExampleDB", "", "The Example QML SQL!", 1000000);
            var r = ""

            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('SELECT * FROM Greeting', [],
                    function(tx, rs) {
                        for(var i = 0; i < rs.rows.length; i++) {
                            r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n"
                        }
                    },
                    function(tx, error) {
                        print("ERROR:", error.message)
                    }
                );
            })

            return r
        }
    }
    text: allGreetings()
}<commit_msg>asynchronous<commit_after>import Qt 4.6

Text {
    Script {
        function findGreetings() {
            var db = openDatabase("QmlExampleDB", "", "The Example QML SQL!", 1000000);

            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('SELECT * FROM Greeting', [],
                        function(tx, rs) {
                            var r = ""
                            for(var i = 0; i < rs.rows.length; i++) {
                                r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n"
                            }
                            text = r
                        },
                        function(tx, error) {
                            print("ERROR:", error.message)
                        }
                    );
                },
                function() {
                    print("ERROR in transaction");
                },
                function() {
                    print("Transaction successful");
                }
            )
        }
    }
    text: "?"
    Component.onCompleted: findGreetings()
}

{'fraction_non_alphanumeric': 0.12575888985255854, 'fraction_numerical': 0.008673026886383347, 'mean_word_length': 1.0561497326203209, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3726793', 'n_tokens_mistral': 626, 'n_tokens_neox': 571, 'n_words': 121}