chore: add default `ORDER BY`

pull/65/head
boojack 3 years ago
parent b52c16c43f
commit 948b53393a

@ -219,7 +219,8 @@ func findMemoRawList(db *sql.DB, find *api.MemoFind) ([]*memoRaw, error) {
content,
row_status
FROM memo
WHERE `+strings.Join(where, " AND "),
WHERE `+strings.Join(where, " AND ")+`
ORDER BY created_ts DESC`,
args...,
)
if err != nil {

@ -154,7 +154,8 @@ func findResourceList(db *sql.DB, find *api.ResourceFind) ([]*resourceRaw, error
created_ts,
updated_ts
FROM resource
WHERE `+strings.Join(where, " AND "),
WHERE `+strings.Join(where, " AND ")+`
ORDER BY created_ts DESC`,
args...,
)
if err != nil {

@ -202,7 +202,8 @@ func findShortcutList(db *sql.DB, find *api.ShortcutFind) ([]*shortcutRaw, error
updated_ts,
row_status
FROM shortcut
WHERE `+strings.Join(where, " AND "),
WHERE `+strings.Join(where, " AND ")+`
ORDER BY created_ts DESC`,
args...,
)
if err != nil {

@ -219,7 +219,8 @@ func findUserList(db *sql.DB, find *api.UserFind) ([]*userRaw, error) {
created_ts,
updated_ts
FROM user
WHERE `+strings.Join(where, " AND "),
WHERE `+strings.Join(where, " AND ")+`
ORDER BY created_ts DESC`,
args...,
)
if err != nil {

Loading…
Cancel
Save