Lighter-swift / Lighter

Swift APIs for SQLite: Type-safe down to the schema. Very, very, fast. Dependency free.

Home Page:https://lighter-swift.github.io/documentation/lighter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AST generation fails when a column has over 183 columns

helje5 opened this issue · comments

For example the CoreData database of the Apple Notes application has a table called ZICCLOUDSYNCINGOBJECT, which has 184 properties.

Generation for this eventually crashes due to the recursion done in:

  func generateBindStatementForProperty(
         _ property : EntityInfo.Property,
         index      : Expression,
         trailer    : () -> [ Statement ] = { [] }
       ) -> ( Statement, didRecurse: Bool )

Probably need to flatten that. Maybe not do recursive binds for tables with that many columns at all.