Skip to content

How do you define the conflict action when inserting a Codable object? #812

Open
@ivanmkc

Description

@ivanmkc

Issues are used to track bugs and feature requests.
Need help or have a general question? Ask on Stack Overflow (tag sqlite.swift).

Build Information

Using SQLite.swift (0.11.5) using CocoaPods
Using Xcode 9.3

General guidelines

I can insert Codable objects fine using the below syntax:

try db.run(codableObject)

How do I define what to do with a conflict?
With non-Codable objects, I do:

try db.run(table.insert(or: OnConflict.replace, id <- tile.id))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions