Skip to content

Commit a0fef0c

Browse files
committed
default query.castTimestampToDate
1 parent 198cfbb commit a0fef0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/duckdb.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ export class DuckDBClient {
118118

119119
static async of(sources = {}, config = {}) {
120120
const db = await createDuckDB();
121+
if (config.query?.castTimestampToDate === undefined) {
122+
config = {...config, query: {...config.query, castTimestampToDate: true}};
123+
}
121124
await db.open(config);
122125
await Promise.all(
123126
Object.entries(sources).map(async ([name, source]) => {

0 commit comments

Comments
 (0)