+1
src/database/post.v
+1
src/database/post.v
···
164
164
// todo: query options/filters, such as user:beep, !excluded-text, etc
165
165
pub fn (app &DatabaseAccess) search_for_posts(query string, limit int, offset int) []PostSearchResult {
166
166
println('searching, q=${query},l=${limit},o=${offset}')
167
+
//todo: app.db.q_strings('select from Post where title like \'%${query}%\' or body like \'%${query}%\' order by posted_at desc limit limit offset offset')
167
168
posts := sql app.db {
168
169
select from Post where title like '%${query}%' order by posted_at desc limit limit offset offset
169
170
} or { [] }