QueryUpdate | R Documentation |
Update Query.
Update Query.
This class represents an SQL UPDATE query. See the make_update() factory function to create more easily an UPDATE query object.
sqlq::Query
-> QueryUpdate
new()
Initializer.
QueryUpdate$new(up, set)
up
A StmtUpdate instance.
set
A StmtSet instance.
Nothing.
clone()
The objects of this class are cloneable with this method.
QueryUpdate$clone(deep = FALSE)
deep
Whether to make a deep clone.
make_update
# To generate a simple UPDATE query:
where <- StmtWhere$new(ExprBinOp$new(
ExprField$new("year"), "<",
ExprValue$new(2010)
))
set <- make_set(price = 9.50, old = TRUE)
update <- QueryUpdate$new(StmtUpdate$new('books'), set = set)
update$add(where)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.