query-functions {sqliter} | R Documentation |
query functions
Description
**query functions** are dynamic functions which connect
to a database, execute queries in it and transform data.
Actually it is a decorator for execute
function.
execute
has 5 arguments. The first argument is an
instance of the sqliter
class and the second is
the database name. The call to a query function is
executed like a method call to the sqliter
object
through the $
operator. The function name must
have the following pattern: query_<database name
without extension>
. This call returns an execute
function with the first 2 argument already set. The first
parameter is the sqliter
object on which the
$
operator have been called and the second
argument is extracted from the query function name, the
name after the preffix query_
.
Examples
## Not run:
DBM <- sqliter(path=c("data", "another/project/data"))
DBM$query_dummydatabase("select count(*) from dummytable")
## End(Not run)
[Package sqliter version 0.1.0 Index]