Learn R Programming

sqliter (version 0.1.0)

query-functions: 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_. 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_.

Arguments

Examples

Run this code
## Not run: 
# DBM <- sqliter(path=c("data", "another/project/data"))
# DBM$query_dummydatabase("select count(*) from dummytable")
# ## End(Not run)

Run the code above in your browser using DataLab