Skip to content

Commit e2c0a75

Browse files
committed
temp: attempt to "smallify" codegen JSON
1 parent 90c1225 commit e2c0a75

File tree

3 files changed

+223
-2
lines changed

3 files changed

+223
-2
lines changed

internal/endtoend/testdata/codegen_json/gen/codegen.json

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,102 @@
152152
{
153153
"comment": "",
154154
"name": "pg_catalog",
155-
"tables": [],
155+
"tables": [
156+
{
157+
"rel": {
158+
"catalog": "pg_catalog",
159+
"schema": "pg_catalog",
160+
"name": "pg_timezone_names"
161+
},
162+
"columns": [
163+
{
164+
"name": "is_dst",
165+
"not_null": false,
166+
"is_array": false,
167+
"comment": "",
168+
"length": 1,
169+
"is_named_param": false,
170+
"is_func_call": false,
171+
"scope": "",
172+
"table": {
173+
"catalog": "pg_catalog",
174+
"schema": "pg_catalog",
175+
"name": "pg_timezone_names"
176+
},
177+
"table_alias": "",
178+
"type": {
179+
"catalog": "",
180+
"schema": "",
181+
"name": "bool"
182+
}
183+
},
184+
{
185+
"name": "name",
186+
"not_null": false,
187+
"is_array": false,
188+
"comment": "",
189+
"length": -1,
190+
"is_named_param": false,
191+
"is_func_call": false,
192+
"scope": "",
193+
"table": {
194+
"catalog": "pg_catalog",
195+
"schema": "pg_catalog",
196+
"name": "pg_timezone_names"
197+
},
198+
"table_alias": "",
199+
"type": {
200+
"catalog": "",
201+
"schema": "",
202+
"name": "text"
203+
}
204+
},
205+
{
206+
"name": "utc_offset",
207+
"not_null": false,
208+
"is_array": false,
209+
"comment": "",
210+
"length": 16,
211+
"is_named_param": false,
212+
"is_func_call": false,
213+
"scope": "",
214+
"table": {
215+
"catalog": "pg_catalog",
216+
"schema": "pg_catalog",
217+
"name": "pg_timezone_names"
218+
},
219+
"table_alias": "",
220+
"type": {
221+
"catalog": "",
222+
"schema": "",
223+
"name": "interval"
224+
}
225+
},
226+
{
227+
"name": "abbrev",
228+
"not_null": false,
229+
"is_array": false,
230+
"comment": "",
231+
"length": -1,
232+
"is_named_param": false,
233+
"is_func_call": false,
234+
"scope": "",
235+
"table": {
236+
"catalog": "pg_catalog",
237+
"schema": "pg_catalog",
238+
"name": "pg_timezone_names"
239+
},
240+
"table_alias": "",
241+
"type": {
242+
"catalog": "",
243+
"schema": "",
244+
"name": "text"
245+
}
246+
}
247+
],
248+
"comment": ""
249+
}
250+
],
156251
"enums": [],
157252
"composite_types": []
158253
}

internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,102 @@
152152
{
153153
"comment": "",
154154
"name": "pg_catalog",
155-
"tables": [],
155+
"tables": [
156+
{
157+
"rel": {
158+
"catalog": "pg_catalog",
159+
"schema": "pg_catalog",
160+
"name": "pg_timezone_names"
161+
},
162+
"columns": [
163+
{
164+
"name": "is_dst",
165+
"not_null": false,
166+
"is_array": false,
167+
"comment": "",
168+
"length": 1,
169+
"is_named_param": false,
170+
"is_func_call": false,
171+
"scope": "",
172+
"table": {
173+
"catalog": "pg_catalog",
174+
"schema": "pg_catalog",
175+
"name": "pg_timezone_names"
176+
},
177+
"table_alias": "",
178+
"type": {
179+
"catalog": "",
180+
"schema": "",
181+
"name": "bool"
182+
}
183+
},
184+
{
185+
"name": "name",
186+
"not_null": false,
187+
"is_array": false,
188+
"comment": "",
189+
"length": -1,
190+
"is_named_param": false,
191+
"is_func_call": false,
192+
"scope": "",
193+
"table": {
194+
"catalog": "pg_catalog",
195+
"schema": "pg_catalog",
196+
"name": "pg_timezone_names"
197+
},
198+
"table_alias": "",
199+
"type": {
200+
"catalog": "",
201+
"schema": "",
202+
"name": "text"
203+
}
204+
},
205+
{
206+
"name": "utc_offset",
207+
"not_null": false,
208+
"is_array": false,
209+
"comment": "",
210+
"length": 16,
211+
"is_named_param": false,
212+
"is_func_call": false,
213+
"scope": "",
214+
"table": {
215+
"catalog": "pg_catalog",
216+
"schema": "pg_catalog",
217+
"name": "pg_timezone_names"
218+
},
219+
"table_alias": "",
220+
"type": {
221+
"catalog": "",
222+
"schema": "",
223+
"name": "interval"
224+
}
225+
},
226+
{
227+
"name": "abbrev",
228+
"not_null": false,
229+
"is_array": false,
230+
"comment": "",
231+
"length": -1,
232+
"is_named_param": false,
233+
"is_func_call": false,
234+
"scope": "",
235+
"table": {
236+
"catalog": "pg_catalog",
237+
"schema": "pg_catalog",
238+
"name": "pg_timezone_names"
239+
},
240+
"table_alias": "",
241+
"type": {
242+
"catalog": "",
243+
"schema": "",
244+
"name": "text"
245+
}
246+
}
247+
],
248+
"comment": ""
249+
}
250+
],
156251
"enums": [],
157252
"composite_types": []
158253
}

internal/engine/postgresql/pg_catalog.go

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)