-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from mindler-olli/main
added PutItemQueryBuilder
- Loading branch information
Showing
23 changed files
with
1,026 additions
and
528 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ExpressionConditionComparators } from "./operands"; | ||
|
||
export type ExpressionComparatorExpressions = { | ||
readonly kind: "ExpressionComparatorExpressions"; | ||
readonly key: string; | ||
readonly operation: ExpressionConditionComparators; | ||
readonly value: unknown; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ExpressionJoinTypeNode } from "./expressionJoinTypeNode"; | ||
|
||
export type ExpressionNode = { | ||
readonly kind: "ExpressionNode"; | ||
readonly expressions: ExpressionJoinTypeNode[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ExpressionNode } from "./expressionNode"; | ||
|
||
export type ExpressionNotExpression = { | ||
readonly kind: "ExpressionNotExpression"; | ||
readonly expr: ExpressionNode; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export type ItemNode = { | ||
readonly kind: "ItemNode"; | ||
readonly item: Record<string, unknown>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ExpressionNode } from "./expressionNode"; | ||
import { ItemNode } from "./itemNode"; | ||
import { ReturnValuesNode } from "./returnValuesNode"; | ||
import { TableNode } from "./tableNode"; | ||
|
||
export type PutNode = { | ||
readonly kind: "PutNode"; | ||
readonly table: TableNode; | ||
readonly conditionExpression: ExpressionNode; | ||
readonly item?: ItemNode; | ||
readonly returnValues?: ReturnValuesNode; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type ReturnValuesOptions = | ||
| "NONE" | ||
| "ALL_OLD" | ||
| "UPDATED_OLD" | ||
| "ALL_NEW" | ||
| "UPDATED_NEW"; | ||
|
||
export type ReturnValuesNode = { | ||
readonly kind: "ReturnValuesNode"; | ||
readonly option: ReturnValuesOptions; | ||
}; |
11 changes: 11 additions & 0 deletions
11
src/queryBuilders/__snapshots__/putItemQueryBuilder.integration.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`PutItemQueryBuilder > handles 'contains' ConditionExpression 1`] = ` | ||
{ | ||
"dataTimestamp": 212, | ||
"tags": [ | ||
"cats", | ||
], | ||
"userId": "333", | ||
} | ||
`; |
Oops, something went wrong.