Skip to content

Commit

Permalink
Merge pull request #374 from rsodre/in-operator-fix
Browse files Browse the repository at this point in the history
fix: accept and convert in operator arrays
  • Loading branch information
MartianGreed authored Jan 14, 2025
2 parents 3bf693c + 48f5f3c commit 57b923a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/sdk/src/convertQuerytoClause.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ function convertToPrimitive(value: any): torii.MemberValue {
};
} else if (typeof value === "string") {
return { String: value };
} else if (Array.isArray(value)) {
return { List: value.map((item) => convertToPrimitive(item)) };
}

// Add more type conversions as needed
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export type WhereCondition<TModel> =
$gte?: TModel[P];
$lt?: TModel[P];
$lte?: TModel[P];
$in?: TModel[P][];
$nin?: TModel[P][];
};
};

Expand Down

0 comments on commit 57b923a

Please sign in to comment.