How do you define the conflict action when inserting a Codable object?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 20/100
Research direction
Start from the Codable insertion call, try db.run(codableObject), and compare it with the explicitly configured table.insert(or: OnConflict.replace, ...) form shown in the issue. Check the insertion API documentation and relevant implementation entry points to determine whether conflict behavior is supported for Codable objects; done means the supported usage or required documentation change is clearly identified.
Written by the indexing model from the issue text.
Description
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))
- Dominant language
- Swift
- Stars
- 10.2k
- Forks
- 1.6k
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stephencelis/SQLite.swift
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
stephencelis/SQLite.swift#1375 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
stephencelis/SQLite.swift#1293 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
stephencelis/SQLite.swift#1347 · 7 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
stephencelis/SQLite.swift#1338 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
stephencelis/SQLite.swift#1337 · 3 comments ·
All issues in stephencelis/SQLite.swift
Similar issues
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
skiptools/skip-fuse-ui#147 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OneBusAway/onebusaway-ios#1438 · 1 reaction ·