Skip to content

Commit d785536

Browse files
committed
feat: using emit_module, emit_generators and emit_async flags you can now generate query code that suites your need
1 parent d5a393b commit d785536

File tree

6 files changed

+242
-232
lines changed

6 files changed

+242
-232
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.wasm

internal/config.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package python
22

33
type Config struct {
4+
EmitModule bool `json:"emit_module"` // If true emits functions in module, else wraps in a class.
5+
EmitGenerators bool `json:"emit_generators"` // Will we use generators or lists, defaults to true
6+
EmitAsync bool `json:"emit_async"` // Emits async code instead of sync
47
EmitExactTableNames bool `json:"emit_exact_table_names"`
5-
EmitSyncQuerier bool `json:"emit_sync_querier"`
6-
EmitAsyncQuerier bool `json:"emit_async_querier"`
8+
EmitSyncQuerier bool `json:"emit_sync_querier"` // DEPRECATED ALIAS FOR: emit_type = 'class', emit_generators = True
9+
EmitAsyncQuerier bool `json:"emit_async_querier"` // DEPRECATED ALIAS FOR: emit_type = 'class', emit_generators = True
710
Package string `json:"package"`
811
Out string `json:"out"`
912
EmitPydanticModels bool `json:"emit_pydantic_models"`

0 commit comments

Comments
 (0)