Add: 修改

This commit is contained in:
2022-04-02 17:42:30 +08:00
parent 880c26b8d3
commit 7bc70f5c25
3 changed files with 68 additions and 17 deletions

View File

@@ -33,9 +33,13 @@ const insertTimeRange = db.prepare(
);
const getTimeRanges = db.prepare(`SELECT * FROM time_ranges`);
const deleteTimeRange = db.prepare(`DELETE FROM time_ranges WHERE id = ?`);
const update = db.prepare(
`UPDATE time_ranges SET name = ?, range = ?, username = ? WHERE id = ?`
);
const updateUsername = db.prepare(
`UPDATE time_ranges SET username = ? WHERE id = ?`
);
const countUser = db.prepare(
`SELECT COUNT(*) as count FROM time_ranges WHERE username = ?`
);
@@ -88,6 +92,7 @@ export {
insertTimeRange,
getTimeRanges,
deleteTimeRange,
update,
updateUsername,
updateUsernameWithLimit,
getLimit,