Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql type support #24

Open
zztkm opened this issue Oct 24, 2023 · 0 comments
Open

mysql type support #24

zztkm opened this issue Oct 24, 2023 · 0 comments

Comments

@zztkm
Copy link

zztkm commented Oct 24, 2023

I would like to add mysql as a supported target to give type hints other than Any to the generated models.

The following is an example with a pydantic model.

No mysql support:

# Code generated by sqlc. DO NOT EDIT.
# versions:
#   sqlc v1.20.0
import pydantic
from typing import Optional


class Author(pydantic.BaseModel):
    id: Any
    name: Any
    bio: Optional[Any]

If support mysql !

# Code generated by sqlc. DO NOT EDIT.
# versions:
#   sqlc v1.20.0
import pydantic
from typing import Optional


class Author(pydantic.BaseModel):
    id: int
    name: str
    bio: Optional[str]
zztkm added a commit to zztkm/sqlc-gen-python that referenced this issue Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant