SQLite.swift
SQLite.swift copied to clipboard
Non-optional date functions?
I'd like to be able to write the following:
let creationTime = Expression<Date>("created_at")
try db.run(foo.create { t in
// ...
t.column(creationTime, defaultValue: DateFunctions.datetime("now"))
})
But currently this doesn't work because the various date functions return Expression<Date?>, rather than Expression<Date>. Is it possible to get a non-optional version of the now() function?
Any update on this? I am getting the same error when
t.column(created, defaultValue: DateFunctions.datetime("now"))
Hey guys,
Did you find a solution to this error?
So there should be a DateFunctions.now returning Expression<Date>?