huaxk
huaxk
`Repo.insert!(Here, (name="test1", lnglat=ST_GeomFromEWKT("SRID=4326;POINT(12 34)")))` generate error sql: `INSERT INTO heres (name, lnglat) VALUES ($1, $2) (name = "test1", lnglat = SQLFunction(:ST_GeomFromEWKT, ("SRID=4326;POINT(12 34)",)))` I think it should be correct to...
I know: `SearchLight.count(Article) `generate SQL QUERY: `SELECT COUNT(*) AS __cid FROM "articles"` If i want to use SQL function(SUM or other function) to generate SQL like: `SELECT SUM(id) AS __sid...
Can I try to implement this feature? My project needs to use this feature.
Is there unit test code in SearchLight source code? If there is a test that will help to write new code.
Very looking forward to this feature.
If the query result set might be empty, you should try tryQuery: ``` let (id, username) = tryQuery: select user(id, username) where id == 1 limit 1 ``` The result:...
Maybe returning Option(tuple[id: int, name: stirng]) is more reasonable.
You need limit 1, otherwise it will return a seq.
Ormin maybe not so smart!
The problem may be here: ``` let something = query: select antibot(answer & answer, (if ip == "hi": 0 else: 1)) where ip == ?ip and answer =~ "%things%" orderby...