dzikoysk / sqiffy

Experimental compound SQL framework with type-safe DSL API generated at compile-time from annotation based scheme diff

Home Page:https://sqiffy.reposilite.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support SQLite

dzikoysk opened this issue · comments

SQLite is relatively bad solution for a database that will be updated in the future due to:

  • Lack of quite a lot of crucial types
  • Enums are not supported
  • RETYPE operation would be limited to a given group of type affinities: https://www.sqlite.org/datatype3.html
  • Constraints update require redeclaration of the whole table & full copy of its content
    • Currently, Sqiffy uses a workaround with a modification of table scheme stored in sqlite_master. (experimental)
  • Inserts does not return autogenerated keys, so it requires additional select in the transaction to properly obtain last inserted row record

Todo:

  • Provide a strict mode that forbids to use features that are not directly supported by this db
    • Enums
    • Constraint updates
    • Column type changes

Experimental SQLite support should be available in 1.0.0-alpha.25. SQLite does not support schema updates directly, so I've backported them through changes to sqlite_master - the stability of this solution is unknown.