-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Running v0.15.3 under Xcode 16.2
Under Usage:
let id = Expression("id")
t.column(id, primaryKey: true)
is suppose to translate to the query clause
"id" INTEGER PRIMARY KEY NOT NULL
Instead it is translated to
"id" TEXT PRIMARY KEY NOT NULL
Note: Under Xcode 16, it now necessary to include the argument label 'value.
let id = Expression(value: "id")
After executions id is
id SQLite.Expression
when it should be
id SQLite.Expression
The problem is the code base takes its UnderlyingType from "id", which is a String,
not from . See Expression.swift, line 110.
The fact Expression is translated to TEXT is further exemplified by
the following code which will no longer compile:
enum booleans: Int64 {
case TRUE = 1, FALSE = 0
}
let isActive = Expression(value: "isActive")
t.column(isActive, defaultValue: booleans.TRUE.rawValue)
results in the compiler error:
Cannot convert value of type 'Expression' to expected argument type 'Expression<Int64?>'