◐ Shell
reader mode source ↗
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/emit_pydantic_models/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- name: py
wasm:
url: file://../../../../bin/sqlc-gen-python.wasm
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
sql:
- schema: schema.sql
queries: query.sql
Expand Down
Empty file.
20 changes: 20 additions & 0 deletions internal/endtoend/testdata/enum_with_eq/db/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
43 changes: 43 additions & 0 deletions internal/endtoend/testdata/enum_with_eq/db/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
2 changes: 2 additions & 0 deletions internal/endtoend/testdata/enum_with_eq/query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
13 changes: 13 additions & 0 deletions internal/endtoend/testdata/enum_with_eq/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/exec_result/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- name: py
wasm:
url: file://../../../../bin/sqlc-gen-python.wasm
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
sql:
- schema: schema.sql
queries: query.sql
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/exec_rows/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- name: py
wasm:
url: file://../../../../bin/sqlc-gen-python.wasm
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
sql:
- schema: schema.sql
queries: query.sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- name: py
wasm:
url: file://../../../../bin/sqlc-gen-python.wasm
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
sql:
- schema: schema.sql
queries: query.sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- name: py
wasm:
url: file://../../../../bin/sqlc-gen-python.wasm
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
sql:
- schema: schema.sql
queries: query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- name: py
wasm:
url: file://../../../../bin/sqlc-gen-python.wasm
sha256: "a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e"
sql:
- schema: schema.sql
queries: query.sql
Expand Down
3 changes: 3 additions & 0 deletions internal/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ func pyEnumValueName(value string) string {
id := strings.Replace(value, "-", "_", -1)
id = strings.Replace(id, ":", "_", -1)
id = strings.Replace(id, "/", "_", -1)
id = pyIdentPattern.ReplaceAllString(id, "")
return strings.ToUpper(id)
}
Expand Down
Toggle all file notes Toggle all file annotations