更新依赖
This commit is contained in:
@@ -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"')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user