r-dbi / dbi3

DBI revisited
https://r-dbi.github.io/dbi3
37 stars 2 forks source link

Stronger guarantees for quoting literals #45

Open krlmlr opened 2 years ago

krlmlr commented 2 years ago

Quoting NA values should always return a query that yields a NULL of the correct type. This might be especially challenging in MariaDB where the support for coercion is weak. Could perhaps be simulated by

SELECT x FROM (SELECT '' AS x, 0 AS y UNION ALL SELECT NULL AS x, 1 AS y) qq WHERE y = 1

for such backends.

From https://github.com/r-dbi/RPostgres/issues/357.

Also, we should include at least date, time, and interval types.