mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 00:01:34 +00:00
fix broken sql completion (#6919)
This commit is contained in:
@@ -492,12 +492,18 @@
|
||||
if (typeof newSchemaRes === 'string') {
|
||||
const resourcePath = newSchemaRes.replace('$res:', '')
|
||||
dbSchema = $dbSchemas[resourcePath]
|
||||
if (lang === 'graphql' && dbSchema === undefined) {
|
||||
await getDbSchemas(lang, resourcePath, $workspaceStore, $dbSchemas, (e) => {
|
||||
console.error('error getting graphql db schema', e)
|
||||
})
|
||||
dbSchema = $dbSchemas[resourcePath]
|
||||
if (dbSchema === undefined) {
|
||||
if (lang === 'graphql') {
|
||||
await getDbSchemas('graphql', resourcePath, $workspaceStore, $dbSchemas, (e) => {
|
||||
console.error('error getting graphql db schema', e)
|
||||
})
|
||||
} else if (lang === 'sql') {
|
||||
await getDbSchemas(scriptLang ?? '', resourcePath, $workspaceStore, $dbSchemas, (e) => {
|
||||
console.error(`error getting SQL (${scriptLang}) db schema`, e)
|
||||
})
|
||||
}
|
||||
}
|
||||
dbSchema = $dbSchemas[resourcePath]
|
||||
} else {
|
||||
dbSchema = undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user