forked from adelsz/pgtyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,944 additions
and
296 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
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
115 changes: 115 additions & 0 deletions
115
packages/query/src/loader/typescript/__snapshots__/query.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,115 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`array param 1`] = ` | ||
Object { | ||
"events": Array [], | ||
"query": Object { | ||
"params": Array [ | ||
Object { | ||
"location": Object { | ||
"a": 34, | ||
"b": 36, | ||
"col": 34, | ||
"line": 1, | ||
}, | ||
"name": "ids", | ||
"selection": Object { | ||
"type": "scalar_array", | ||
}, | ||
}, | ||
], | ||
"text": "select * from users where id in $$ids", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`array spread param 1`] = ` | ||
Object { | ||
"events": Array [], | ||
"query": Object { | ||
"params": Array [ | ||
Object { | ||
"location": Object { | ||
"a": 72, | ||
"b": 80, | ||
"col": 11, | ||
"line": 2, | ||
}, | ||
"name": "customers", | ||
"selection": Object { | ||
"keys": Array [ | ||
"customerName", | ||
"contactName", | ||
"address", | ||
], | ||
"type": "object_array", | ||
}, | ||
}, | ||
], | ||
"text": "INSERT INTO customers (customer_name, contact_name, address) | ||
VALUES $$customers(customerName, contactName, address)", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`pick param 1`] = ` | ||
Object { | ||
"events": Array [], | ||
"query": Object { | ||
"params": Array [ | ||
Object { | ||
"location": Object { | ||
"a": 33, | ||
"b": 43, | ||
"col": 33, | ||
"line": 1, | ||
}, | ||
"name": "activeUsers", | ||
"selection": Object { | ||
"keys": Array [ | ||
"userOne", | ||
"userTwo", | ||
], | ||
"type": "object", | ||
}, | ||
}, | ||
], | ||
"text": "select * from users where id in $activeUsers(userOne, userTwo)", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`scalar param 1`] = ` | ||
Object { | ||
"events": Array [], | ||
"query": Object { | ||
"params": Array [ | ||
Object { | ||
"location": Object { | ||
"a": 32, | ||
"b": 33, | ||
"col": 32, | ||
"line": 1, | ||
}, | ||
"name": "id", | ||
"selection": Object { | ||
"type": "scalar", | ||
}, | ||
}, | ||
Object { | ||
"location": Object { | ||
"a": 47, | ||
"b": 51, | ||
"col": 47, | ||
"line": 1, | ||
}, | ||
"name": "title", | ||
"selection": Object { | ||
"type": "scalar", | ||
}, | ||
}, | ||
], | ||
"text": "select * from users where id = $id and title= $title", | ||
}, | ||
} | ||
`; |
Oops, something went wrong.