更新依赖

This commit is contained in:
lyswhut
2023-04-09 15:35:00 +08:00
parent 6d949d7e4d
commit bdd5b46708
18 changed files with 833 additions and 492 deletions
@@ -13,9 +13,9 @@ import {
* @param id 歌曲id
* @returns 歌曲信息
*/
export const queryMusicInfo = (id: string): LX.DBService.MusicInfoOtherSource[] => {
export const queryMusicInfo = (id: string) => {
const musicInfoQueryStatement = createMusicInfoQueryStatement()
return musicInfoQueryStatement.all(id)
return musicInfoQueryStatement.all(id) as LX.DBService.MusicInfoOtherSource[]
}
/**
@@ -55,5 +55,5 @@ export const clearMusicInfo = () => {
*/
export const countMusicInfo = () => {
const countStatement = createCountStatement()
return countStatement.get().count
return (countStatement.get() as { count: number }).count
}
@@ -33,7 +33,7 @@ export const createMusicInfoInsertStatement = () => {
*/
export const createMusicInfoClearStatement = () => {
const db = getDB()
return db.prepare(`
return db.prepare<[]>(`
DELETE FROM "main"."music_info_other_source"
`)
}
@@ -56,5 +56,5 @@ export const createMusicInfoDeleteStatement = () => {
*/
export const createCountStatement = () => {
const db = getDB()
return db.prepare('SELECT COUNT(*) as count FROM "main"."music_info_other_source"')
return db.prepare<[]>('SELECT COUNT(*) as count FROM "main"."music_info_other_source"')
}