RMonetQuery: Query MonetDB using SQL

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Run arbitrary SQL queries against the MonetDB and return the results as a data.frame

Usage

1
RMonetQuery(con, sql, parameters=list(), autocommit=FALSE, lastid=FALSE, page=FALSE)

Arguments

con

an Open MonetDB Connection handle

sql

Arbitrary SQL to execute

parameters

list of string values substituted into the ? placeholders

autocommit

optional - boolean flag TRUE to auto commit

lastid

optional - boolean flag TRUE to return the last row ID affected - good for INSERT statements

page

optional - boolean flag TRUE to page the results - does nothing at the moment :-)

Details

1
2
3
4
5
6
  con <- RMonetConnect("db.yml")
  res <- RMonetQuery(con,  "SELECT * FROM voc.craftsmen WHERE trip > ? LIMIT ?", list(3,15))
  print(res)

  RMonetClose(con)
  

Value

Returns a data.frame of the table contents selected

Note

Not much to note here.

Author(s)

Piers Harding

See Also

RMonet, RMonetConnect, RMonetGetInfo, RMonetQuery, RMonetLoadDataFrame, RMonetExecute, RMonetClose, RMonetStartTransaction, RMonetCommit, RMonetIsConnected, RMonetQuote, RMonetUnQuote, RMonetExists, RMonetListTables, RMonetListFields

Examples

1
2
3
4
5
## Not run: 
# read the VOC craftsmen table with parameter substitutions
RMonetQuery(con,  "SELECT * FROM voc.craftsmen WHERE trip > ? LIMIT ?", list(3,15))

## End(Not run)

piersharding/RMonet documentation built on May 25, 2019, 6:09 a.m.