Struct msi::ColumnBuilder
[−]
[src]
pub struct ColumnBuilder { /* fields omitted */ }
A factory for configuring a new database column.
Methods
impl ColumnBuilder
[src]
fn localizable(self) -> ColumnBuilder
Makes the column be localizable.
fn nullable(self) -> ColumnBuilder
Makes the column allow null values.
fn primary_key(self) -> ColumnBuilder
Makes the column be a primary key column.
fn range(self, min: i32, max: i32) -> ColumnBuilder
Makes the column only permit values in the given range.
fn foreign_key(self, table_name: &str, column_index: i32) -> ColumnBuilder
Makes the column refer to a key column in another table.
fn category(self, category: ColumnCategory) -> ColumnBuilder
For string columns, makes the column use the specified data format.
fn enum_values(self, values: &[&str]) -> ColumnBuilder
Makes the column only permit the given values.
fn int16(self) -> Column
Builds a column that stores a 16-bit integer.
fn int32(self) -> Column
Builds a column that stores a 32-bit integer.
fn string(self, max_len: usize) -> Column
Builds a column that stores a string.
fn id_string(self, max_len: usize) -> Column
Builds a column that stores an identifier string. This is equivalent
to self.category(ColumnCategory::Identifier).string(max_len)
.
fn text_string(self, max_len: usize) -> Column
Builds a column that stores a text string. This is equivalent to
self.category(ColumnCategory::Text).string(max_len)
.
fn binary(self) -> Column
Builds a column that refers to a binary data stream. This sets the
category to ColumnCategory::Binary
in addition to setting the column
type.