SQLiteColumnSeed-class | R Documentation |
Extensions of SQLDataFrame, SQLColumnVector, SQLColumnSeed with different SQL backends. Currently supporting SQLite and DuckDB, with which the definition coding can be followed for added extension of other SQL backends.
path |
String containing a path to a SQL file. |
table |
String containing the name of the table in SQL file. |
column |
String containing the name of the column inside the table. |
length |
Integer containing the number of rows. If
|
type |
String specifying the type of the data. If |
## Mocking up a file:
### SQLite
tf <- tempfile()
on.exit(unlink(tf))
con <- DBI::dbConnect(RSQLite::SQLite(), tf)
DBI::dbWriteTable(con, "mtcars", mtcars)
DBI::dbDisconnect(con)
### DuckDB
tf1 <- tempfile()
on.exit(unlist(tf1))
con <- DBI::dbConnect(duckdb::duckdb(), tf1)
DBI::dbWriteTable(con, "mtcars", mtcars)
DBI::dbDisconnect(con)
## Constructor of xxColumnSeed and xxColumnVector
sd <- SQLiteColumnSeed(tf, "mtcars", "gear")
scv <- SQLiteColumnVector(sd)
scv1 <- SQLiteColumnVector(tf, "mtcars", "gear")
identical(scv, scv1)
DuckDBColumnSeed(tf1, "mtcars", "mpg")
DuckDBColumnVector(tf1, "mtcars", "mpg")
## Constructor of xxDataFrame
SQLiteDataFrame(tf, "mtcars")
DuckDBDataFrame(tf1, "mtcars")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.