Skip to content

Fails after after 1000 calls to Sqlite on iOS #1

@n8sabes

Description

@n8sabes

This only works for < 1000 calls to Sqlite. Below is a loop that reproduces the problem. Does fail for you on iOS, and if so, do you have any ideas why it's happening or how to fix it?

        $scope.insert = function(firstname, lastname) {
            var query = "INSERT INTO people (firstname, lastname) VALUES (?,?)";
            for( var i = 0; i < 2000; i++ ) {
                $cordovaSQLite.execute(db, query, [firstname, lastname]).then(function(res) {
                    var message = "INSERT ID -> " + res.insertId;
                    console.log(message);
                }, function (err) {
                    console.error(err);
                    alert(err);
                });
            }
        }

I forked your project with an example of the bug:
https://github.com/n8sabes/ionic-sqlite-1000-transactions-ios-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions