mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
refactor: extract sqlite constants
This commit is contained in:
@ -0,0 +1 @@
|
||||
export const TABLES_QUERY = 'SELECT name FROM sqlite_master WHERE type=\'table\' AND name NOT LIKE \'sqlite_%\' ORDER BY name'
|
||||
@ -7,6 +7,7 @@ import type {
|
||||
SQLiteVFS,
|
||||
} from './sqlite/types'
|
||||
import { useCallback, useEffect, useReducer, useRef } from 'react'
|
||||
import { TABLES_QUERY } from './sqlite/constants'
|
||||
|
||||
export type { SQLiteQueryResult, SQLiteValue } from './sqlite/types'
|
||||
|
||||
@ -17,8 +18,6 @@ export type UseSQLiteDatabaseResult = {
|
||||
queryTable: (tableName: string, limit?: number) => Promise<SQLiteQueryResult | null>
|
||||
}
|
||||
|
||||
const TABLES_QUERY = 'SELECT name FROM sqlite_master WHERE type=\'table\' AND name NOT LIKE \'sqlite_%\' ORDER BY name'
|
||||
|
||||
let sqliteClientPromise: Promise<SQLiteClient> | null = null
|
||||
|
||||
function createTempFileName(): string {
|
||||
|
||||
Reference in New Issue
Block a user