Skip to content

Unexpected upsert row count from SQLite #1

@jasondentler

Description

@jasondentler

To do Upserts in SQLite, I'm doing INSERT OR IGNORE... then UPDATE. As a result, the row count of a successful Upsert may be 1 or 2.

As a work around, to test for a success, use something like row count > 0 && row count <= 2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions