Closed monxalo closed 4 years ago
Isn't this already available?
https://github.com/Kotlin/anko/blob/master/anko/library/static/sqlite/src/sqlTypes.kt
Yes, UNIQUE is already available. This is to support conflict clauses.
A simpler version of the example can also be written like so:
CREATE TABLE table_name
(
_id INTEGER PRIMARY KEY AUTOINCREMENT,
record_id INTEGER NOT NULL UNIQUE ON CONFLICT REPLACE,
...
)
Support for table UNIQUE conflict clauses would be nice, e.g.:
ON CONFLICT
clause: