Skip to content

Commit 1c9872f

Browse files
committed
Update Patterns SQL Interface - JSON Input.md
1 parent cd4cf80 commit 1c9872f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Patterns SQL Interface - JSON Input.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ WITH
4141
'[' ||
4242
'"C:/Winows/System32/drivers/etc/hosts",' ||
4343
'"C:/Users/Public/Desktop/pic",' ||
44-
'"C:/Users/Default/Music/drum"' ||
45-
']'
46-
) AS dirs
47-
)
44+
'"C:/Users/Default/Music/drum"' ||
45+
']'
46+
) AS dirs
47+
)
4848
SELECT * FROM folders;
4949
~~~
5050

@@ -63,7 +63,7 @@ WITH
6363
folders AS (
6464
SELECT dirs."key" AS id, dirs.value AS path
6565
FROM json_each(@Paths) AS dirs
66-
)
66+
)
6767
SELECT * FROM folders;
6868
~~~
6969

@@ -90,10 +90,10 @@ WITH
9090
'{' ||
9191
'"239": "C:/Winows/System32/drivers/etc/hosts",' ||
9292
'"876": "C:/Users/Public/Desktop/pic",' ||
93-
'"374": "C:/Users/Default/Music/drum"' ||
94-
'}'
95-
) AS dirs
96-
)
93+
'"374": "C:/Users/Default/Music/drum"' ||
94+
'}'
95+
) AS dirs
96+
)
9797
SELECT * FROM folders;
9898
~~~
9999

@@ -112,7 +112,7 @@ WITH
112112
folders AS (
113113
SELECT dirs."key" AS bin_id, dirs.value AS path
114114
FROM json_each(@Paths) AS dirs
115-
)
115+
)
116116
SELECT * FROM folders;
117117
~~~
118118

@@ -147,7 +147,7 @@ WITH
147147
'{"bin_id": "876", "prefix": "C:/Users/Public/Desktop", "name": "pic" },' ||
148148
'{"bin_id": "374", "prefix": "C:/Users/Default/Music", "name": "drum" }' ||
149149
']'
150-
) AS dirs
150+
) AS dirs
151151
)
152152
SELECT * FROM folders;
153153
~~~
@@ -170,7 +170,7 @@ WITH
170170
json_extract(dirs.value, '$.prefix') AS prefix,
171171
json_extract(dirs.value, '$.name') AS name
172172
FROM json_each(@Paths) AS dirs
173-
)
173+
)
174174
SELECT * FROM folders;
175175
~~~
176176

0 commit comments

Comments
 (0)