Description Usage Arguments Details Examples
Simple implementation showing how to implement a query_fun
for a sqlite DB.
1 | query_sqlite(con, params, tbl, id_field = NA)
|
con |
DBI database connection |
params |
named list provided by a datatable containing sorting, filtering and pagination data. |
tbl |
string, the table/view in sqlite. |
id_field |
string, optional. Field used to identify a row when using |
This function can be provided to sql_filter_factory
to describe how to
fetch a datatable payload from a sqlite table.
This implementation provides paging and sorting, but filtering and row indices filters are not yet implemented.
This function will be called via sql_filter_factory
with arguments
con
, page
, and ...
(where ...
are any extra
arguments given to sql_filter_factory
). With this example an additional
tbl
parameter has been implemented, which would be expected to be
passed in when sql_filter_factory
is called.
1 2 3 4 | ## Not run:
sql_filter_factory(con, query_sqlite, tbl = "mtcars")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.