You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* work
* work
* fragment
* fragment
* feat(docs): Update README.md with information about configuration options and type overrides (feat/omit-kwargs)
* update sqlc

|`package`| string | yes | The name of the package where the generated files will be located |
@@ -54,34 +56,39 @@ More options at the [`sqlc` config reference](https://docs.sqlc.dev/en/stable/re
54
56
|`docstrings`| string | no | If set, there will be docstrings generated in the selected format. This can be one of `google`, `numpy`, `pep257` and `none`. `none` will not generate any docstrings. |
55
57
|`docstrings_emit_sql`| bool | no | If set to `false` the SQL code for each query wont be included in the docstrings. This defaults to `true` but is not used when `docstrings` is not set or set to `none`|
56
58
|`query_parameter_limit`| integer | no | Not yet implemented. |
59
+
|`omit_kwargs_limit`| integer | no | This can be used to set a limit where any query with less or equal amounts of parameters will not require kwargs for the parameters. This defaults to `0` which makes every query require kwargs for their parameters. |
57
60
|`speedups`| bool | no | If set to `true` the plugin will use other librarys for type conversion. Needs extra dependecys to be installed. This option currently only affects `sqlite3` & `aiosqlite` and uses the library `ciso8601`|
58
61
|`overrides`| list[Override]| no | A list of [type overrides](#type-overrides). |
59
62
|`debug`| bool | no | If set to `true`, there will be debug logs generated into a `log.txt` file when executing `sqlc generate`. Defaults to `false`|
60
63
61
64
### Type Overrides
62
-
Similar to `sqlc-gen-go` this plugin supports overriding types with your own. You can either override the type of every column that has a specific sql type, or you can overwrite the type of specific columns.
65
+
66
+
Similar to `sqlc-gen-go` this plugin supports overriding types with your own. You can either override the type of every
67
+
column that has a specific sql type, or you can overwrite the type of specific columns.
63
68
64
69
```yaml
65
70
# filename: sqlc.yaml
66
71
# ...
67
-
options:
68
-
# ...
69
-
overrides:
70
-
- db_type: text
71
-
py_type:
72
-
import: collections
73
-
package: UserString
74
-
type: UserString
75
-
- column: table_name.text_column
76
-
py_type:
77
-
import: collections
78
-
type: collections.UserString
72
+
options:
73
+
# ...
74
+
overrides:
75
+
- db_type: text
76
+
py_type:
77
+
import: collections
78
+
package: UserString
79
+
type: UserString
80
+
- column: table_name.text_column
81
+
py_type:
82
+
import: collections
83
+
type: collections.UserString
79
84
80
85
```
81
86
82
87
## Feature Support
88
+
83
89
Every [sqlc macro](https://docs.sqlc.dev/en/latest/reference/macros.html) is supported.
84
-
The supported [query commands](https://docs.sqlc.dev/en/latest/reference/query-annotations.html) depend on the SQL driver you are using, supported commands are listed below.
90
+
The supported [query commands](https://docs.sqlc.dev/en/latest/reference/query-annotations.html) depend on the SQL
91
+
driver you are using, supported commands are listed below.
85
92
> Every `:batch*` command is not supported by this plugin and probably will never be.
86
93
87
94
> Prepared Queries are not planned for the near future, but will be implemented sooner or later
@@ -95,15 +102,21 @@ The supported [query commands](https://docs.sqlc.dev/en/latest/reference/query-a
95
102
| mysql | no | no | no | no | no | no | no |
96
103
97
104
## Development
105
+
98
106
A roadmap of what is planned & worked on can be found [here](https://github.com/users/rayakame/projects/1/).
99
107
100
-
Contributions are very welcome, for more information and help please read the [contribution guidelines](https://github.com/rayakame/sqlc-gen-better-python/blob/main/CONTRIBUTING.md).
108
+
Contributions are very welcome, for more information and help please read
109
+
the [contribution guidelines](https://github.com/rayakame/sqlc-gen-better-python/blob/main/CONTRIBUTING.md).
110
+
101
111
### Changelog
112
+
102
113
Can be found [here](https://github.com/rayakame/sqlc-gen-better-python/blob/main/CHANGELOG.md)
103
114
104
115
## Credits
105
-
Because of missing documentation about creating these plugins, this work is heavily
116
+
117
+
Because of missing documentation about creating these plugins, this work is heavily
0 commit comments