Changeset: 06b94f52eb2e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=06b94f52eb2e
Added Files:
        clients/R/MonetDB.R/man/MonetDBLite.Rd
Modified Files:
        clients/R/MonetDB.R/R/dbi.R
        clients/R/MonetDB.R/R/mapi.R
        clients/R/MonetDB.R/man/MonetDB.R.Rd
Branch: embedded
Log Message:

Minor updates for DBI driver


diffs (92 lines):

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
@@ -361,6 +361,7 @@ setMethod("dbSendQuery", signature(conn=
     env$conn <- conn
     env$query <- statement
     env$info <- resp
+    env$info$rows <- 0
   }
   if (resp$type == MSG_MESSAGE) {
     env$success = FALSE
diff --git a/clients/R/MonetDB.R/R/mapi.R b/clients/R/MonetDB.R/R/mapi.R
--- a/clients/R/MonetDB.R/R/mapi.R
+++ b/clients/R/MonetDB.R/R/mapi.R
@@ -183,7 +183,8 @@ REPLY_SIZE    <- 100 # Apparently, -1 me
     if (typeKey == Q_TABLE || typeKey == Q_PREPARE) {
       header <- .mapiParseHeader(lines[1])
       if (getOption("monetdb.debug.query", F)) message("QQ: Query result for 
query ", header$id, 
-                                                       " with ", header$rows, 
" rows and ", header$cols, " cols, ", header$index, " rows.")
+                                                       " with ", 
.mapiLongInt(header$rows), " rows and ", 
+                                                       header$cols, " cols, ", 
header$index, " rows.")
       
       env$type <- Q_TABLE
       env$id           <- header$id
@@ -196,8 +197,7 @@ REPLY_SIZE    <- 100 # Apparently, -1 me
       env$lengths      <- .mapiParseTableHeader(lines[5])
       
       if (env$rows > 0) env$tuples <- lines[6:length(lines)]
-      
-      stopifnot(length(env$tuples) == header$index)
+
       return(env)
     }
     # Continuation of Q_TABLE without headers describing table structure
diff --git a/clients/R/MonetDB.R/man/MonetDB.R.Rd 
b/clients/R/MonetDB.R/man/MonetDB.R.Rd
--- a/clients/R/MonetDB.R/man/MonetDB.R.Rd
+++ b/clients/R/MonetDB.R/man/MonetDB.R.Rd
@@ -6,7 +6,7 @@
 \alias{MonetR}
 
 \title{
-  DBI database connector and virtual data object for MonetDB
+  DBI database connector for MonetDB
 }
 \description{
   \code{MonetDB.R} creates a new DBI driver that can be used to connect and 
interact with MonetDB.
@@ -29,10 +29,7 @@
   \code{\link{monetdb.read.csv}} for database CSV import.
 }
 \seealso{
-  \code{\link[DBI]{dbConnect}} for documentation how to invoke the driver
-  
-%  \code{\link[MonetDB.R]{monet.frame}} for a \code{data.frame()}-like 
interface to the DB  
-  
+  \code{\link[DBI]{dbConnect}} for documentation how to invoke the driver  
   \code{\link[=control]{monetdb.server.setup}} to set up and start a local 
MonetDB server from R
 }
 \examples{
diff --git a/clients/R/MonetDB.R/man/MonetDBLite.Rd 
b/clients/R/MonetDB.R/man/MonetDBLite.Rd
new file mode 100644
--- /dev/null
+++ b/clients/R/MonetDB.R/man/MonetDBLite.Rd
@@ -0,0 +1,29 @@
+\name{MonetDBLite}
+\alias{MonetDBLite}
+\alias{RMonetDBLite}
+\alias{monetdblite}
+\alias{rmonetdblite}
+
+\title{
+  MonetDBLite DBI driver
+}
+\description{
+  \code{MonetDBLite} creates a new DBI driver to interact with MonetDBLite
+}
+\usage{
+  MonetDBLite()
+}
+\value{
+  Returns a MonetDBLite driver object that can be used in calls to
+  \code{\link[DBI]{dbConnect}}.
+}
+\details{
+  The \code{MonetDB.R} function creates the R object which can be used to a
+  call \code{\link[DBI]{dbConnect}} which actually creates the connection. 
+  Since it has no parameters, it is most commonly used inline with the 
\code{\link[DBI]{dbConnect}} call.
+}
+\examples{
+\dontrun{
+conn <- dbConnect(MonetDBLite(), tempdir())
+
+}}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to