groue / GRDB.swift

A toolkit for SQLite databases, with a focus on application development
MIT License
6.88k stars 708 forks source link

.save(_: Database): REPLACE INTO support #526

Closed zdnk closed 5 years ago

zdnk commented 5 years ago

Hello again,

I am repeatedly running into the fact that I need REPLACE INTO statement to be used in save(_: Database) method. Is there any plan to support it, or enable it, or am I just missing something somewhere?

Right now, I always end up writing my own replace/insert on the model.

zdnk commented 5 years ago

Found it in tests: static let persistenceConflictPolicy = PersistenceConflictPolicy(insert: .replace, update: .replace)

groue commented 5 years ago

Documentation: https://github.com/groue/GRDB.swift/blob/master/README.md#conflict-resolution