[R-sig-DB] dbWriteTable and dbReadTable generics

Seth Falcon @eth @end|ng |rom u@erpr|m@ry@net
Sat Oct 19 01:12:11 CEST 2013


On Fri, Oct 18, 2013 at 9:56 AM, Hadley Wickham <h.wickham using gmail.com> wrote:

> I'd like to discuss one small change that will require changes in some
> dependencies: updating the arguments to dbWriteTable and dbReadTable.
>

snip

I'd like to move these to the generics to get:
>
> setGeneric("dbWriteTable",
>   def = function(conn, name, value, row.names = FALSE,
>                        overwrite = FALSE, append = FALSE, ...) {
>      standardGeneric("dbWriteTable")
>   }, valueClass = "logical"
> )
>
> setGeneric("dbReadTable",
>   def = function(conn, name, row.names = FALSE, ...) {
>     standardGeneric("dbReadTable")
>   },
>   valueClass = "data.frame"
> )
>
> I'd also suggest a change to the semantics of row.names. It should be:
>
> * TRUE to use the row.names column
> * FALSE to not use row names
> * a character string to specify an alternative column to use for row names
>
> I think this is close to the currently convention, but it is not well
> documented.
>
> This will require a small amount of work for any maintainers who
> currently don't implement these options.
>
> I'll also be careful when handling any future cran releases of DBI -
> all downstream maintainers will get a heads up at least a month before
> submission before CRAN so you'll have time to make any changes without
> cran breathing down your neck.
>


+1 on these from me.

+ seth


-- 
Seth Falcon | @sfalcon | http://userprimary.net/

	[[alternative HTML version deleted]]




More information about the R-sig-DB mailing list