Open dawkot opened 4 years ago
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 desc(ip)
limit 1
The generated SQL is:
select a1.answer || a1.answer, (
case
when a1.ip = 'hi' then
0
else
1
end)
from antibot as a1
where a1.ip = ? and a1.answer like '%things%'
order by a1.ip desc
limit 1
It runs without error in sqlite client after set the ip condition. Don't know why it goes wrong while preparing sql, it throws exception: DbError: no such column: a1.answer. Who can help!
I have no clue how to interpret this message.