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.
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 totimestamp
,timestamp with time zone
, ordate
. Each requires a different format.driver.Valuer
interface.