Skip to content
Prev 1330 / 1559 Next

SQL escaping/quoting proposal

I've cleaned up the examples and made them work and put the results in
https://gist.github.com/hadley/7057387 - that should make discussion a
bit more concrete.
Yes, I think that makes the most sense.
I think that would be up to the individual function author: you could
assume that if a vector was passed then you should quote then
concatenate together with ".".  Or you could assume that for more
complicated references the user had already flagged that the input
should not be escaped with sql().
Fixed.
I'm pretty sure it should be db to be consistent with the rest of the
package. (And I've also added dbFetch as an alias since fetch is the
_only_ function in DBI without the db prefix)
Right, we can only support what the db can.

The quoting function could also throw an error if it was not possible
to quote the input in a safe way for the database.

Hadley