File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
frontend/src/core/codemirror/language/languages/sql Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export class CompletionBuilder {
5353 * Set a value at a nested path, creating intermediate objects as needed
5454 */
5555 private setAt ( path : string [ ] , value : SQLNamespace ) : void {
56+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5657 let current : any = this . schema ;
5758 for ( const key of path . slice ( 0 , - 1 ) ) {
5859 if ( ! current [ key ] ) {
@@ -66,7 +67,7 @@ export class CompletionBuilder {
6667 /**
6768 * Build the final schema
6869 */
69- build ( ) : Record < string , any > {
70+ build ( ) : SQLNamespace {
7071 return this . schema ;
7172 }
7273
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class SQLCompletionStore {
4242 }
4343
4444 private getConnectionSchema ( connection : DataSourceConnection ) : CachedSchema {
45- const { default_database, databases } = connection ;
45+ const { default_database, databases, default_schema } = connection ;
4646 const builder = new CompletionBuilder ( ) ;
4747
4848 // When there is only one database, it is the default
@@ -89,7 +89,7 @@ class SQLCompletionStore {
8989 }
9090
9191 // Otherwise, we need to use the fully qualified name
92- for ( const database of connection . databases ) {
92+ for ( const database of databases ) {
9393 // Skip the default database, since we already added it
9494 if ( database . name === defaultDb ?. name ) {
9595 continue ;
@@ -112,7 +112,7 @@ class SQLCompletionStore {
112112 return {
113113 shouldAddLocalTables : true ,
114114 schema : builder . build ( ) ,
115- defaultSchema : connection . default_schema ?? undefined ,
115+ defaultSchema : default_schema ?? undefined ,
116116 } ;
117117 }
118118
You can’t perform that action at this time.
0 commit comments