Skip to content

Commit dbc3b2b

Browse files
committed
fix filtering on relationships
1 parent de643e5 commit dbc3b2b

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# DuckDB Connector Changelog
22
This changelog documents changes between release tags.
33

4+
## [0.1.7] - 2025-01-15
5+
* Fix filtering across relationships
6+
47
## [0.1.6] - 2025-01-15
58
* Fix github workflow
69

connector-definition/connector-metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
packagingDefinition:
22
type: PrebuiltDockerImage
3-
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.6
3+
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.7
44
supportedEnvironmentVariables:
55
- name: DUCKDB_URL
66
description: The url for the DuckDB database
77
commands:
88
update:
99
type: Dockerized
10-
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.6
10+
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.7
1111
commandArgs:
1212
- update
1313
dockerComposeWatch:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "duckdb-sdk",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

src/handlers/query.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ function build_where(
308308
subquery_sql = `
309309
SELECT 1
310310
FROM ${from_collection_alias} AS ${escape_double(subquery_alias)}
311-
WHERE ${predicate ? build_where(predicate, collection_relationships, args, variables, prefix, collection_aliases, config, query_request) : '1 = 1'}
311+
WHERE ${predicate ? build_where(predicate, collection_relationships, args, variables, subquery_alias, collection_aliases, config, query_request) : '1 = 1'}
312312
AND ${Object.entries(relationship.column_mapping).map(([from, to]) => {
313313
return `${escape_double(prefix)}.${escape_double(from)} = ${escape_double(subquery_alias)}.${escape_double(to)}`;
314314
}).join(" AND ")}
@@ -594,7 +594,6 @@ export async function do_query(
594594
state: State,
595595
query: QueryRequest
596596
): Promise<QueryResponse> {
597-
// console.log(JSON.stringify(query, null, 4));
598597
let query_plans = await plan_queries(configuration, query);
599598
return await perform_query(state, query_plans);
600599
}

0 commit comments

Comments
 (0)