Commit 190c069
committed
chore: replace interface{} with any in Go/SQLite code generation
Replaces all auto-generated interface{} with any in Go/SQLite code
generation templates and type mapping functions. This is the modern Go
idiom since Go 1.18 (any is a built-in alias for interface{}).
Changes:
- sqlite_type.go: return 'any' instead of 'interface{}' for SQLite
'any' type and unknown type default case
- go_type.go: return 'any' instead of 'interface{}' for unknown engine
default case
- result.go: update type comparison from 'interface{}' to 'any'
- template.tmpl: Scan() methods use 'any' parameter type
- stdlib/queryCode.tmpl: use '[]any' instead of '[]interface{}'
- stdlib/dbCode.tmpl: DBTX interface and helpers use '...any'
- Update all SQLite endtoend test golden files
Signed-off-by: Md Mushfiqur Rahim <20mahin2020@gmail.com>1 parent ecec179 commit 190c069
103 files changed
Lines changed: 325 additions & 325 deletions
File tree
- internal
- codegen/golang
- templates
- stdlib
- endtoend/testdata
- accurate_sqlite/sqlite/stdlib/go
- alias/sqlite/go
- between_args/sqlite/go
- builtins/sqlite/go
- case_named_params/sqlite/go
- case_sensitive/sqlite/go
- cast_param/sqlite/go
- coalesce_as/sqlite/go
- coalesce/sqlite/go
- column_as/sqlite/go
- comment_syntax/sqlite/go
- comparisons/sqlite/go
- count_star/sqlite/go
- create_view/sqlite/go
- data_type_boolean/sqlite/db
- datatype/sqlite/go
- ddl_alter_table_add_column/sqlite/go
- ddl_alter_table_case_sensitivity/sqlite/go
- ddl_alter_table_drop_column/sqlite/go
- ddl_alter_table_rename_column/sqlite/go
- ddl_alter_table_rename/sqlite/go
- ddl_create_table_strict/sqlite/go
- ddl_create_table_without_rowid/sqlite/go
- ddl_create_table/sqlite/go
- ddl_create_trigger/sqlite/go
- ddl_drop_table_if_exists/sqlite/go
- ddl_drop_table/sqlite/go
- delete_from/sqlite/go
- emit_db_and_json_tags/sqlite/go
- emit_db_tags/sqlite/go
- emit_methods_with_db_argument/sqlite/go
- emit_pointers_for_null_types/sqlite/go
- exec_create_table/sqlite/db
- full_outer_join/sqlite/go
- func_call_cast/sqlite/go
- func_match_types/sqlite/go
- identical_tables/sqlite/go
- inflection/sqlite/go
- insert_default_values/sqlite/go
- insert_select/sqlite/go
- insert_values/sqlite/go
- join_alias/sqlite/go
- join_from/sqlite/go
- join_left_same_table/sqlite/go
- join_left/sqlite/go
- join_table_name/sqlite/go
- join_two_tables/sqlite/go
- join_where_clause/sqlite/go
- json_param_type/sqlite/go
- jsonb/sqlite/go
- limit/sqlite/go
- named_param/sqlite/go
- overrides_go_struct_tags/sqlite/go
- overrides_go_types/sqlite/go
- overrides/sqlite/go
- quoted_colname/sqlite/go
- quoted_names_complex/sqlite/go
- quoted_tablename/sqlite/go
- returning/sqlite/go
- select_column_cast/sqlite/go
- select_cte/sqlite/go
- select_exists/sqlite/go
- select_in_and/sqlite/go
- select_limit/sqlite/go
- select_nested_count/sqlite/go
- select_not_exists/sqlite/go
- select_star/sqlite/go
- select_subquery_no_alias/sqlite/go
- select_union/sqlite/go
- single_param_conflict/sqlite/go
- sqlc_arg/sqlite/go
- sqlc_embed/sqlite/go
- sqlc_narg/sqlite/go
- sqlc_slice_prepared/sqlite/go
- sqlc_slice/sqlite/go
- sqlite_table_options/sqlite/go
- star_expansion/sqlite/go
- subquery_calculated_column/sqlite/go
- table_function/sqlite/go
- table_name_case_sensitivity/sqlite/go
- untyped_columns/sqlite/stdlib/db
- update_set_multiple/sqlite/go
- update_set/sqlite/go
- upsert/sqlite/go
- virtual_table/sqlite/go
- where_collate/sqlite/go
- wrap_errors/sqlite/db
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments