Fix string concatenation
This commit is contained in:
parent
46e71d8b44
commit
d852a3d153
1 changed files with 2 additions and 2 deletions
|
@ -261,7 +261,7 @@ pub fn query(db: anytype, args: QueryArgs, alloc: std.mem.Allocator) !QueryResul
|
|||
const max_items = if (args.max_items > max_max_items) max_max_items else args.max_items;
|
||||
|
||||
if (args.owner_id != null) try builder.andWhere("owner_id = $1");
|
||||
if (args.like != null) try builder.andWhere("(host LIKE ('%' + $2 + '%') OR name LIKE ('%' + $2 + '%'))");
|
||||
if (args.like != null) try builder.andWhere("(host LIKE ('%' || $2 || '%') OR name LIKE ('%' || $2 || '%'))");
|
||||
if (args.created_before != null) try builder.andWhere("created_at < $3");
|
||||
if (args.created_after != null) try builder.andWhere("created_at > $4");
|
||||
if (args.prev) |prev| {
|
||||
|
@ -345,7 +345,7 @@ pub fn query(db: anytype, args: QueryArgs, alloc: std.mem.Allocator) !QueryResul
|
|||
.order_val = getOrderVal(result_buf[count - 1], args.order_by),
|
||||
};
|
||||
}
|
||||
// TODO: This will give an incorrect previous page link on an empty page
|
||||
// TODO: This will give incorrect links on an empty page
|
||||
|
||||
return QueryResult{
|
||||
.items = result_buf[0..count],
|
||||
|
|
Loading…
Reference in a new issue