Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/runtime/edge-runtime/ext/trex/js/dbconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ export class TrexConnection {
`${duckdbNativeSchemName}.COHORT`
);
}*/
const replacement = schemaName === "" ? "" : `${schemaName}.`;
// Use fully qualified 3-part name (catalog.schema.table) to avoid DuckDB
// "Ambiguous reference to catalog or schema" error when databaseCode equals schemaName
const databaseName = this.connection.getdatabase();
const replacement = schemaName === "" ? "" : `${databaseName}.${schemaName}.`;
return sql.replace(/\$\$SCHEMA\$\$./g, replacement);
}
}
Loading