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

Duplication when querying the same column twice #43

Open
juliuslipp opened this issue Feb 26, 2024 · 0 comments
Open

Duplication when querying the same column twice #43

juliuslipp opened this issue Feb 26, 2024 · 0 comments

Comments

@juliuslipp
Copy link

juliuslipp commented Feb 26, 2024

UPDATE api_keys
...
WHERE key = ? OR key = ?

->

def update_api_key_last_used(self, *, key: Any, key: Any) -> None:
    self._conn.execute(sqlalchemy.text(UPDATE_API_KEY_LAST_USED), {"p1": key, "p2": key})

As you can see key is used twice as the variable name which will obviously not work.

Config:

version: '2'
plugins:
  - name: py
    wasm:
      url: https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.2.0.wasm
      sha256: a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0e
sql:
  - engine: "sqlite"
    queries: "...."
    schema: "..."
    codegen:
      - out: "..."
        plugin: py
        options:
          emit_sync_querier: True
          emit_async_querier: True
          package: "database"
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