Skip to content

Conversation

santinalbrowns
Copy link

  • Convert MySQL '?' placeholders to named parameters (':p1', ':p2', etc.) for proper SQLAlchemy parameter binding
  • Add MySQL type mapping support for Python type inference
  • Fix SQL syntax error when using generated code with MySQL + SQLAlchemy

The generated code was using '?' placeholders in SQL but passing named parameters as dictionaries, which caused MySQL syntax errors. This fix ensures the SQL uses named parameters that match the parameter binding.

Fixes parameter binding issues for MySQL users of sqlc-gen-python.

- Convert MySQL '?' placeholders to named parameters (':p1', ':p2', etc.)
  for proper SQLAlchemy parameter binding
- Add MySQL type mapping support for Python type inference
- Fix SQL syntax error when using generated code with MySQL + SQLAlchemy

The generated code was using '?' placeholders in SQL but passing named
parameters as dictionaries, which caused MySQL syntax errors. This fix
ensures the SQL uses named parameters that match the parameter binding.

Fixes parameter binding issues for MySQL users of sqlc-gen-python.
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

Successfully merging this pull request may close these issues.

1 participant