Schema-class.Rd
A Schema is an Entity that defines a set of columns in a table.
An R6 class object.
Schema(name=NULL, columns=NULL, parent=NULL, properties=NULL, annotations=NULL, description=NULL)
: Constructor for Schema
addColumn(column)
: Adds a Column
to the schema
addColumns(columns)
: Adds a list of Column
s to the schema
has_columns()
: Are there any Column
s specified in the schema?
removeColumn(column)
: Removes a Column
from the schema
if (FALSE) {
schema <- Schema(name='MyTable', parent=project)
schema$addColumn(Column(name='Isotope', columnType='STRING'))
cols <- c(Column(name='Atomic Mass', columnType='INTEGER'),
Column(name='Halflife', columnType='DOUBLE'),
Column(name='Discovered', columnType='DATE'))
schema$addColumns(cols)
schema$has_columns()
schema$removeColumn(Column(name='Discovered', columnType='DATE'))
schema <- synStore(schema)
}