We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee9a44b commit 896fc0aCopy full SHA for 896fc0a
packages/sdk/src/convertQuerytoClause.ts
@@ -2,7 +2,8 @@ import * as torii from "@dojoengine/torii-client";
2
import { SchemaType } from "./types";
3
4
export function convertQueryToClause<T extends SchemaType>(
5
- query: Partial<T>
+ query: Partial<T>,
6
+ operator: "And" | "Or" = "And"
7
): torii.Clause {
8
const clauses: torii.Clause[] = [];
9
@@ -37,10 +38,10 @@ export function convertQueryToClause<T extends SchemaType>(
37
38
return clauses[0];
39
}
40
- // If there are multiple clauses, combine them with an AND operator
41
+ // Combine clauses with the specified operator
42
return {
43
Composite: {
- operator: "And",
44
+ operator: operator,
45
clauses: clauses,
46
},
47
};
0 commit comments