Changeset: cd9072035663 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd9072035663
Modified Files:
        clients/R/MonetDB.R/NAMESPACE
        clients/R/MonetDB.R/NEWS
        clients/R/MonetDB.R/R/dbi.R
        clients/R/Tests/dbi.R
        clients/R/Tests/dbi.stable.err
Branch: embedded
Log Message:

R Connector: isIdCurrent


diffs (64 lines):

diff --git a/clients/R/MonetDB.R/NAMESPACE b/clients/R/MonetDB.R/NAMESPACE
--- a/clients/R/MonetDB.R/NAMESPACE
+++ b/clients/R/MonetDB.R/NAMESPACE
@@ -5,7 +5,7 @@ export(MonetDB,MonetR,MonetDBR,MonetDB.R
 export(MonetDBLite,monetdblite,RMonetDBLite,rmonetdblite)
 export(monet.read.csv,monetdb.read.csv)
 # this one is not in the DBI
-exportMethods(dbSendUpdate,dbSendUpdateAsync,dbTransaction,mdbapply)
+exportMethods(dbSendUpdate,dbSendUpdateAsync,dbTransaction,mdbapply,isIdCurrent)
 # shorthands
 export(mc,mq)
 useDynLib(MonetDB.R)
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,6 @@
+1.0.1
+- added isIdCurrent for improved compatibility with RSQLite
+
 1.0.0
 - Added support for esoteric data types such as MONTH_INTERVAL (Thanks, Roman)
 - Cleaned up SQL to R type mapping (we had this twice)
diff --git a/clients/R/MonetDB.R/R/dbi.R b/clients/R/MonetDB.R/R/dbi.R
--- a/clients/R/MonetDB.R/R/dbi.R
+++ b/clients/R/MonetDB.R/R/dbi.R
@@ -816,6 +816,13 @@ setMethod("dbHasCompleted", "MonetDBResu
   return(invisible(TRUE))
 }, valueClass = "logical")
 
+# compatibility with RSQLite
+if (is.null(getGeneric("isIdCurrent"))) setGeneric("isIdCurrent", 
function(dbObj, ...) standardGeneric("isIdCurrent"))
+setMethod("isIdCurrent", signature(dbObj="MonetDBResult"), def=function(dbObj, 
...) {
+  .Deprecated("dbIsValid")
+   dbIsValid(dbObj)
+})
+
 setMethod("dbIsValid", signature(dbObj="MonetDBResult"), def=function(dbObj, 
...) {
   if (dbObj@env$info$type == Q_TABLE) {
     return(dbObj@env$open)
diff --git a/clients/R/Tests/dbi.R b/clients/R/Tests/dbi.R
--- a/clients/R/Tests/dbi.R
+++ b/clients/R/Tests/dbi.R
@@ -62,6 +62,7 @@ stopifnot(identical(dim(iris),dim(iris2)
 # then manually
 res <- dbSendQuery(con,"SELECT \"Species\", \"Sepal.Width\" FROM monetdbtest")
 stopifnot(dbIsValid(res))
+stopifnot(isIdCurrent(res))
 stopifnot(identical(class(res)[[1]],"MonetDBResult"))
 stopifnot(identical(res@env$success,TRUE))
 
diff --git a/clients/R/Tests/dbi.stable.err b/clients/R/Tests/dbi.stable.err
--- a/clients/R/Tests/dbi.stable.err
+++ b/clients/R/Tests/dbi.stable.err
@@ -31,6 +31,10 @@ stderr of test 'dbi` in directory 'clien
 # 12:27:25 >  
 
 Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", 
"Species" contain uppercase or reserved SQL characters and need(s) to be quoted 
in queries.
+Warning message:
+'isIdCurrent' is deprecated.
+Use 'dbIsValid' instead.
+See help("Deprecated") 
 Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", 
"Species" contain uppercase or reserved SQL characters and need(s) to be quoted 
in queries.
 Identifier(s) "Need to quote this table name" contain uppercase or reserved 
SQL characters and need(s) to be quoted in queries.
 Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", 
"Species" contain uppercase or reserved SQL characters and need(s) to be quoted 
in queries.
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to