QueryInsert | R Documentation |
Insert query.
Insert query.
This class represents an SQL SELECT query. See the make_insert() factory function to create more easily an INSERT query object.
sqlq::Query
-> QueryInsert
new()
Initializer.
QueryInsert$new(insert, values)
insert
A StmtInsert instance.
values
A StmtValues instance.
Nothing.
clone()
The objects of this class are cloneable with this method.
QueryInsert$clone(deep = FALSE)
deep
Whether to make a deep clone.
make_insert
# To generate a simple INSERT query:
fields <- c('author', 'title', 'year')
insert <- StmtInsert$new(tabl = 'books', fields = make_fields(fields))
values <- make_rows(list(list('John Smith', 'Memories', 1999),
list('Barbara', 'My Life', 2010)))
insert <- QueryInsert$new(insert = insert, values = values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.