fix(trino): support schema-aware table browsing and inserts
This commit is contained in:
1 parent
2ba97869a1
commit
7f19a0376a
7 files changed
+61
-4
No files matched your search
@@ -12,18 +12,21 @@ export function editablePrimaryKeys(databaseType: DatabaseType | undefined, colu
|
||||
|
||||
export function isTableDataEditable(databaseType: DatabaseType | undefined, primaryKeys: string[]): boolean {
|
||||
if (databaseType === "hive") return true;
|
||||
if (databaseType === "trino") return true;
|
||||
return primaryKeys.length > 0;
|
||||
}
|
||||
|
||||
export function supportsDataGridTransaction(databaseType: DatabaseType | undefined): boolean {
|
||||
return databaseType !== "hive";
|
||||
return databaseType !== "hive" && databaseType !== "trino";
|
||||
}
|
||||
|
||||
export function canEditExistingTableRows(
|
||||
databaseType: DatabaseType | undefined,
|
||||
hiveTableTransactional?: boolean,
|
||||
primaryKeys: string[] = [],
|
||||
): boolean {
|
||||
if (databaseType === "hive") return hiveTableTransactional === true;
|
||||
if (databaseType === "trino") return primaryKeys.length > 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user