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, content,
row_status row_status
FROM memo FROM memo
WHERE `+strings.Join(where, " AND "), WHERE `+strings.Join(where, " AND ")+`
ORDER BY created_ts DESC`,
args..., args...,
) )
if err != nil { if err != nil {

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

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

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

Loading…
Cancel
Save