Changeset: 6481e5191ca6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6481e5191ca6
Modified Files:
clients/R/MonetDB.R/DESCRIPTION
clients/R/MonetDB.R/NEWS
clients/R/MonetDB.R/R/monetdb.R
Branch: default
Log Message:
R Connector: dplyr fixes
Unterschiede (94 Zeilen):
diff --git a/clients/R/MonetDB.R/DESCRIPTION b/clients/R/MonetDB.R/DESCRIPTION
--- a/clients/R/MonetDB.R/DESCRIPTION
+++ b/clients/R/MonetDB.R/DESCRIPTION
@@ -1,6 +1,6 @@
Package: MonetDB.R
-Version: 0.9
-Date: 2013-02-07
+Version: 0.9.1
+Date: 2013-03-01
Title: Connect MonetDB to R
Authors@R: c(person("Hannes Muehleisen", role = c("aut", "cre"),email =
"[email protected]"),
person("Thomas Lumley", role = "ctb"),
diff --git a/clients/R/MonetDB.R/NEWS b/clients/R/MonetDB.R/NEWS
--- a/clients/R/MonetDB.R/NEWS
+++ b/clients/R/MonetDB.R/NEWS
@@ -1,3 +1,9 @@
+0.9.1
+- dplyr compatibility first iteration
+#- fixed leaking of socket variable
+#- fixed monetdb.server.setup for UNIX-like systems (Thanks, Enzo)
+- fixed issue in dbClearResult() which produced a protocol error
+
0.9
- various extensions to monetdb.read.csv
- removed monet.frame from this package, moved to github
diff --git a/clients/R/MonetDB.R/R/monetdb.R b/clients/R/MonetDB.R/R/monetdb.R
--- a/clients/R/MonetDB.R/R/monetdb.R
+++ b/clients/R/MonetDB.R/R/monetdb.R
@@ -110,6 +110,14 @@ setMethod("dbConnect", "MonetDBDriver",
### MonetDBConnection, #monetdb_mapi_conn
setClass("MonetDBConnection",
representation("DBIConnection",socket="externalptr",connenv="environment",fetchSize="integer"))
+setMethod("dbGetInfo", "MonetDBConnection", def=function(dbObj, ...) {
+ envdata <- dbGetQuery(dbObj,"SELECT name, value from
env()")
+ ll <- as.list(envdata$value)
+ names(ll) <- envdata$name
+ ll$name <- "MonetDBConnection"
+ return(ll)
+ })
+
setMethod("dbDisconnect", "MonetDBConnection", def=function(conn, ...) {
.Call("mapiDisconnect",conn@socket,PACKAGE=C_LIBRARY)
return(invisible(TRUE))
@@ -120,6 +128,18 @@ setMethod("dbListTables", "MonetDBConnec
df$name
})
+
+setMethod("dbCommit", "MonetDBConnection", def=function(conn, ...) {
+ dbSendQuery(conn,"commit")
+ invisible(TRUE)
+ })
+
+setMethod("dbRollback", "MonetDBConnection", def=function(conn, ...) {
+ dbSendQuery(conn,"rollback")
+ invisible(TRUE)
+
+ })
+
setMethod("dbListFields", "MonetDBConnection", def=function(conn, name, ...) {
if (!dbExistsTable(conn,name))
stop(paste0("Unknown table: ",name));
@@ -128,7 +148,7 @@ setMethod("dbListFields", "MonetDBConnec
})
setMethod("dbExistsTable", "MonetDBConnection", def=function(conn, name, ...) {
- tolower(name) %in% dbListTables(conn)
+ tolower(name) %in% tolower(dbListTables(conn))
})
@@ -458,8 +478,11 @@ setMethod("fetch", signature(res="MonetD
setMethod("dbClearResult", "MonetDBResult", def = function(res, ...) {
- .mapiRequest(res@env$conn,paste0("Xclose
",res@env$info$id),async=TRUE)
- TRUE
+ resid <- res@env$info$id
+ if (!is.null(resid) && !is.na(resid) &&
is.numeric(resid)) {
+ .mapiRequest(res@env$conn,paste0("Xclose
",resid),async=TRUE)
+ }
+ invisible(TRUE)
},valueClass = "logical")
setMethod("dbHasCompleted", "MonetDBResult", def = function(res, ...) {
@@ -509,8 +532,6 @@ Q_PREPARE <- 5
Q_BLOCK <- 6
-
-
REPLY_SIZE <- 100 # Apparently, -1 means unlimited, but we will start with
a small result set.
# The entire set might never be fetch()'ed after all!
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list