-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lists of raw vectors should map to blobs by default #49
Comments
fine with me. |
How would lists get serialised into the database? I think this is part of a broader issue of allowing people to register custom serialisers and deserialisers for non-standard SQL types/R classes. |
Lists (with |
On option would be to do something like this: setMethod("dbiDataType", "list", function(x) {
is_raw <- vapply(x, is.raw, logical(1))
if (all(is_raw)) {
return("blob")
}
stop("Only lists of raw vectors are currently support", call. = FALSE)
}) |
A thin S3 wrapper is another option:
Here, the checking needs to be done only once during construction. |
RPostgres, RMySQL and RSQLite map those to BLOBs. However, DBI doesn't declare the
dbDataType
method for lists, and the BLOB data type doesn't seem to be part of SQL-92.Shall we add
to DBI?
CC @hannesmuehleisen.
The text was updated successfully, but these errors were encountered: