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

Simulate Prepared Statements by Interpolating Query Parameters #28

Open
ianlopshire opened this issue Aug 28, 2019 · 1 comment
Open

Comments

@ianlopshire
Copy link

I believe prepared statements could be simulated by interpolating the parameters. go-sql-driver/mysql does something similar here.

Would a PR for something like this be considered?

Potential Problems/Solutions

  • time.Time can map to timestamp, timestamp with time zone, or date. Each requires a different format.
    • The only real option I see here is defining a type for each that implements the driver.Valuer interface.
  • Ensuring correct sanitation could be difficult. I've had a difficult time finding any specifics regarding how Athena differs from Presto in this regard.
    • I think this could be solved with a robust test suite.
@stevep-arm
Copy link

#17 related

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

2 participants