RMonetExecute: Execute SQL against MonetDB

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

Description

Execute arbitrary SQL statements against the MonetDB database

Usage

1
RMonetExecute(con, sql, autocommit=TRUE, lastid=FALSE, try=FALSE)

Arguments

con

an Open MonetDB Connection handle

sql

SQL query to call

autocommit

optional - set autocommit for the statement to true

lastid

optional - return the record ID of the record affected - useful for INSERT

try

optional - try executing the statement - return FALSE on failure - TRUE for success

Details

con <- RMonetConnect("db.yml") res = RMonetExecute(con, "SELECT * FROM voc.craftsmen LIMIT 3") print(res) checkTrue(as.numeric(res) == 3) RMonetClose(con)

Value

RMonetExecute executes and returns the count of records affected

Note

nothing.

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: 
# Execute the query
RMonetExecute(con, "SELECT * FROM voc.craftsmen LIMIT 3")

## End(Not run)

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