dbDataType
matches R data types to dolt data types. For text and blob data
types, it automatically chooses amongst options (e.g., VARCHAR(N),
TEXT,
LONGTEXT, etc.
) based on maximum field length. An attribute of maximum
size of these fields is returned to support operations where fields need to be recast in revision.
# S4 method for DoltConnection
dbDataType(
dbObj,
obj,
min_varchar = Sys.getenv("DOLT_MINVARCAHR", 255L),
max_varchar = Sys.getenv("DOLT_MAXVARCHAR", 16383L),
...
)
dolt_type_sizes(types)
the database connection
the data type (vector or data frame)
The minimum size VARCHAR
types should be cast as
the maximum size VARCHAR
types should be cast as. Larger
text data will return types TEXT
,MEDIUMTEXT
, or LONGTEXT
further arguments to methods
a character vector of dolt types, e.g., "VARCHAR(12)"
,
"LONGBLOB"
, "TINYINT"
, etc.
A character vector of classes, with attributes of the maximum size for text and blob classes
dolt_type_sizes()
takes a vector of SQL types and returns the maximum field
size, if applicable.