Skip to content

Simulate Prepared Statements by Interpolating Query Parameters #28

@ianlopshire

Description

@ianlopshire

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions