-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix composite decoder with array field
- Loading branch information
Showing
7 changed files
with
192 additions
and
62 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 |
---|---|---|
@@ -1,2 +1,18 @@ | ||
-- name: ArrayNested2 :one | ||
SELECT | ||
ARRAY [ | ||
ROW ('img2', ROW (22, 22)::dimensions)::product_image_type, | ||
ROW ('img3', ROW (33, 33)::dimensions)::product_image_type | ||
] AS images; | ||
|
||
-- name: Nested3 :many | ||
SELECT ROW (ROW ('item_name', ROW ('sku_id')::sku)::inventory_item, 88)::qux AS qux; | ||
SELECT | ||
ROW ( | ||
'name', -- name | ||
ROW ('img1', ROW (11, 11)::dimensions)::product_image_type, -- orig_image | ||
ARRAY [ --images | ||
ROW ('img2', ROW (22, 22)::dimensions)::product_image_type, | ||
ROW ('img3', ROW (33, 33)::dimensions)::product_image_type | ||
] | ||
)::product_image_set_type; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
CREATE TYPE SKU AS ( | ||
sku_id text | ||
CREATE TYPE dimensions AS ( | ||
width int4, | ||
height int4 | ||
); | ||
|
||
CREATE TYPE inventory_item AS ( | ||
item_name text, | ||
sku SKU | ||
CREATE TYPE product_image_type AS ( | ||
source text, | ||
dimensions dimensions | ||
); | ||
|
||
CREATE TABLE qux ( | ||
inv_item inventory_item, | ||
foo int8 | ||
CREATE TYPE product_image_set_type AS ( | ||
name text, | ||
orig_image product_image_type, | ||
images product_image_type[] | ||
); |
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