mirror of
https://github.com/Canner/WrenAI.git
synced 2026-10-24 23:57:16 +08:00
fix invalid session props will cause future saveDataSource action to fail (#138)
This commit is contained in:
@@ -41,6 +41,9 @@ export class DuckDBConnector
|
||||
}
|
||||
public async prepare(prepareOptions: DuckDBPrepareOptions): Promise<void> {
|
||||
const { initSql, sessionProps } = prepareOptions;
|
||||
|
||||
// clear previous session props to prevent, invalid session props error from prior saveDataSource action.
|
||||
await this.wrenEngineAdaptor.putSessionProps([]);
|
||||
await this.wrenEngineAdaptor.initDatabase(initSql);
|
||||
await this.wrenEngineAdaptor.putSessionProps(sessionProps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user