Skip to content

Commit

Permalink
fix filtering on relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
TristenHarr committed Jan 16, 2025
1 parent de643e5 commit dbc3b2b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# DuckDB Connector Changelog
This changelog documents changes between release tags.

## [0.1.7] - 2025-01-15
* Fix filtering across relationships

## [0.1.6] - 2025-01-15
* Fix github workflow

Expand Down
4 changes: 2 additions & 2 deletions connector-definition/connector-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
packagingDefinition:
type: PrebuiltDockerImage
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.6
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.7
supportedEnvironmentVariables:
- name: DUCKDB_URL
description: The url for the DuckDB database
commands:
update:
type: Dockerized
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.6
dockerImage: ghcr.io/hasura/ndc-duckdb:v0.1.7
commandArgs:
- update
dockerComposeWatch:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duckdb-sdk",
"version": "0.1.6",
"version": "0.1.7",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/handlers/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function build_where(
subquery_sql = `
SELECT 1
FROM ${from_collection_alias} AS ${escape_double(subquery_alias)}
WHERE ${predicate ? build_where(predicate, collection_relationships, args, variables, prefix, collection_aliases, config, query_request) : '1 = 1'}
WHERE ${predicate ? build_where(predicate, collection_relationships, args, variables, subquery_alias, collection_aliases, config, query_request) : '1 = 1'}
AND ${Object.entries(relationship.column_mapping).map(([from, to]) => {
return `${escape_double(prefix)}.${escape_double(from)} = ${escape_double(subquery_alias)}.${escape_double(to)}`;
}).join(" AND ")}
Expand Down Expand Up @@ -594,7 +594,6 @@ export async function do_query(
state: State,
query: QueryRequest
): Promise<QueryResponse> {
// console.log(JSON.stringify(query, null, 4));
let query_plans = await plan_queries(configuration, query);
return await perform_query(state, query_plans);
}

0 comments on commit dbc3b2b

Please sign in to comment.