xcode10.2, filter内使用>=判断符,会导致
try connection.check(sqlite3_prepare_v2(connection.handle, SQL, -1, &handle, nil))
返回报错信息
near ":_": syntax error
Duplicate of #888
My failing line of code:
try db.run(table.filter(timestamp < before).delete())
(where "db" is a Connection, "table" is a Table, "timestamp" is a Expression\
This generates the statement DELETE FROM "some_table" WHERE ("timestamp" <(_:_:) ?).
Apparently the Date gets encoded as (_:_:) ?
It turns out the podspec version has not been updated, so Cocoapods is downloading a stale version of the repo. I worked around this by linking my Podfile directly to the repo.
You use like:
let query = table.filter(0...10 ~= value)
to filter out value between 0 and 10