Merge pull request #1 from 2anoubis/fix-postgresql-parameter-type
Fix PostgreSQL parameter type error in ListChats
This commit is contained in:
@@ -2019,10 +2019,10 @@ func (store *MessageStore) ListChats(
|
|||||||
}
|
}
|
||||||
q += " ORDER BY " + order
|
q += " ORDER BY " + order
|
||||||
|
|
||||||
q += " LIMIT " + placeholder(len(args)+1)
|
q += " LIMIT " + placeholder(len(args)+1) + "::int"
|
||||||
args = append(args, limit)
|
args = append(args, limit)
|
||||||
|
|
||||||
q += " OFFSET " + placeholder(len(args)+2)
|
q += " OFFSET " + placeholder(len(args)+1) + "::int"
|
||||||
args = append(args, page*limit)
|
args = append(args, page*limit)
|
||||||
|
|
||||||
rows, err := store.db.Query(q, args...)
|
rows, err := store.db.Query(q, args...)
|
||||||
|
|||||||
Reference in New Issue
Block a user