db_createColumnDefinitions | R Documentation |
helper function for db_createTable(): generates a column definitions list based on the column types (classes) of the data.frame
db_createColumnDefinitions(
dataframe,
dbType = "SQLite",
dateAsInteger = FALSE,
preferredText = "LONGTEXT",
preferredBlob = "LONGBLOB"
)
dataframe |
data.frame which is to be written to a database using eg db_createTable() |
dbType |
currently only SQLite is a valid value |
dateAsInteger |
boolean, if FALSE the type "DATE" is used, otherwise "INTEGER" is used. This is to circumvent data type conventions |
preferredText |
character string specifying which text field type is to be used. Ignored when dbType = "SQLite" |
preferredBlob |
character string specifying which blob field type is to be used. Ignored when dbType = "SQLite" |
a cahracter list of column names/ column types for use as columnDefinitions in db_createTable()
not all data types are in here yet, they will be added when needed
this function is experimental, may change in the future
DATE fields will come back as integer type in case of SQLite, use if as.Date(..., origin = "1970-01-01") to transform to proper dates
LOGICAL (BOOLEAN) fields will come back as integer type (0 FALSE,1 TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.