mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 16:05:42 +00:00
fix: db schema autocomplete (#2809)
This commit is contained in:
@@ -241,19 +241,13 @@
|
||||
|
||||
let sqlSchemaCompletor: Disposable | undefined = undefined
|
||||
|
||||
let oldSchemaRes = ''
|
||||
function updateSchema() {
|
||||
const newSchemaRes = lang === 'graphql' ? args?.api : args?.database
|
||||
if (typeof newSchemaRes === 'string') {
|
||||
const newSchema = $dbSchemas[newSchemaRes.replace('$res:', '')]
|
||||
if (newSchema && newSchemaRes !== oldSchemaRes) {
|
||||
oldSchemaRes = newSchemaRes
|
||||
dbSchema = newSchema
|
||||
return
|
||||
}
|
||||
dbSchema = $dbSchemas[newSchemaRes.replace('$res:', '')]
|
||||
} else {
|
||||
dbSchema = undefined
|
||||
}
|
||||
dbSchema = undefined
|
||||
oldSchemaRes = ''
|
||||
}
|
||||
|
||||
$: lang && args && $dbSchemas && updateSchema()
|
||||
|
||||
Reference in New Issue
Block a user