Skip to content

Commit 3e51313

Browse files
committed
fix: ensure we are fully backwards compatible
1 parent 4a7f0df commit 3e51313

File tree

13 files changed

+136
-108
lines changed

13 files changed

+136
-108
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
bin
2-
*.wasm
32

43
# Devenv
54
.envrc

internal/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package python
44
type Config struct {
55
EmitAsync bool `json:"emit_async"` // Emits async code instead of sync
66
EmitExactTableNames bool `json:"emit_exact_table_names"`
7-
EmitGenerators bool `json:"emit_generators"` // Will we use generators or lists, defaults to true
7+
EmitGenerators bool `json:"emit_generators"` // Will we use generators or lists, defaults to false
88
EmitModule bool `json:"emit_module"` // If true emits functions in module, else wraps in a class.
99
EmitPydanticModels bool `json:"emit_pydantic_models"`
1010
EmitSyncQuerier bool `json:"emit_sync_querier"` // DEPRECATED ALIAS FOR: emit_type = 'class', emit_generators = True

internal/endtoend/endtoend_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ func TestGenerate(t *testing.T) {
100100
cmd := exec.Command(sqlc, "diff")
101101
cmd.Dir = dir
102102
got, err := cmd.CombinedOutput()
103+
// TODO: We are diffing patches! Does this make sense and what should we provide to the end user?
103104
if diff := cmp.Diff(string(want), string(got)); diff != "" {
104-
t.Errorf("sqlc diff mismatch (-want +got):\n%s", diff)
105+
t.Errorf("sqlc diff mismatch (-want +got):\n%s", string(got))
105106
}
106107
if len(want) == 0 && err != nil {
107108
t.Error(err)

internal/endtoend/testdata/emit_pydantic_models/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

internal/endtoend/testdata/exec_result/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

internal/endtoend/testdata/exec_rows/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

internal/endtoend/testdata/inflection_exclude_table_names/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

internal/endtoend/testdata/query_parameter_limit_two/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

internal/endtoend/testdata/query_parameter_limit_undefined/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

internal/endtoend/testdata/query_parameter_limit_zero/sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://../../../../bin/sqlc-gen-python.wasm
6-
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
6+
sha256: "c97fad53818679a948c68f3ffe84530d7ca4999f636d3f3d89202c6c08ee224d"
77
sql:
88
- schema: schema.sql
99
queries: query.sql

0 commit comments

Comments
 (0)