feat(oceanbase-oracle): support sequences, synonyms and db links
This commit is contained in:
1 parent
a19a4f595d
commit
04376ef3fb
31 files changed
+1225
-91
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import type { DatabaseType } from "@/types/database";
|
||||
import type { OracleDatabaseLink } from "@/lib/database/oracleDatabaseLinks";
|
||||
import { supportsOracleDatabaseLinks, type OracleDatabaseLink } from "@/lib/database/oracleDatabaseLinks";
|
||||
import { isSqlCompletionSuppressedContext } from "@/lib/sql/sqlCompletion";
|
||||
|
||||
export function oracleDatabaseLinkCompletionContext(sql: string, cursor: number, databaseType?: DatabaseType) {
|
||||
if (databaseType !== "oracle" || isSqlCompletionSuppressedContext(sql, cursor, { databaseType })) return null;
|
||||
if (!supportsOracleDatabaseLinks(databaseType) || isSqlCompletionSuppressedContext(sql, cursor, { databaseType })) return null;
|
||||
const before = sql.slice(0, cursor);
|
||||
const match = /(?:[A-Za-z0-9_$#]|"(?:[^"]|"")+"|\))@([A-Za-z0-9_$#.]*)$/.exec(before);
|
||||
if (!match) return null;
|
||||
|
||||
Reference in new issue
Block a user