dbSendQuery: Execute a SQL statement on the database.

Description Usage Arguments Value See Also Examples

Description

dbSendQuery method only submits and synchronously executes the SQL query to the database engine. It does _not_ extract any records - for that you need to use the ‘dbFetch()’ method, and then you must call ‘dbClearResult()’ when you finish fetching the records you need. For interactive use, you should almost always prefer dbGetQuery

Usage

1
  dbSendQuery( conn, statement, ..., list=NULL, async=FALSE )

Arguments

conn

A MonetDB.R database connection. Created using dbConnect with the MonetDB.R database driver.

statement

A SQL statement to be sent to the database, e.g. 'START TRANSACTION' or 'COMMIT'.

...

Parameters to be bound to '?' characters in the query, similar to JDBC.

list

Parameters to be bound to '?' characters in the query as a list, similar to JDBC.

async

Behave like dbSendUpdateAsync? Defaults to FALSE.

Value

Returns MonetDBResult if the query was successful.

See Also

dbGetQuery

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# connect to MonetDB
conn <- dbConnect(MonetDB.R(), "monetdb://localhost/acs")

# start a transaction
dbSendQuery(conn, 'START TRANSACTION')

# commit the transaction
dbSendQuery(conn, 'COMMIT')

## End(Not run)

MonetDB/MonetDB.R documentation built on Dec. 31, 2020, 3:18 p.m.