Skip to main content
pub struct KineticaColumnProperties  /* private fields */ 

Kinetica column properties

Implementations

Source

pub fn new() -> Self

Source

pub fn primary_key(self) -> Self

Marks this column as a primary key

Source

pub fn shard_key(self) -> Self

Marks this column as a shard key

Source

pub fn nullable(self) -> Self

Marks this column as nullable

Source

pub fn timestamp(self) -> Self

Marks this column as a timestamp

Source

pub fn data(self) -> Self

Marks this column as data (generic data property)

Source

pub fn ipv4(self) -> Self

Marks this column as storing an IPv4 address

Source

pub fn wkt(self) -> Self

Marks this column as storing a WKT geometry

Source

pub fn char_n(self, n: usize) -> Self

Marks this column with char(N) type: charN, for N of 1, 2, 4, 8, 16, 32, 64, 128 or 256. The server refuses another size when the type is created (“Unknown property: char3”).

Source

pub fn int8(self) -> Self

Marks this column as int8 (1 byte signed integer)

Source

pub fn int16(self) -> Self

Marks this column as int16 (2 byte signed integer)

Source

pub fn date(self) -> Self

Marks this column as a date

Source

pub fn time(self) -> Self

Marks this column as a time

Source

pub fn datetime(self) -> Self

Marks this column as a datetime

Source

pub fn decimal(self) -> Self

Marks this column as a decimal (SQL NUMERIC(19,4), the server default)

Source

pub fn decimal_with_precision(self, precision: u32, scale: u32) -> Self

Marks this column as a decimal with the given precision and scale, i.e. decimal(P,S)

Written with no space after the comma: the form (decimal\((\d+),(\d+)\)) from which precision and scale are read back out of a type’s properties.

Source

pub fn uuid(self) -> Self

Marks this column as storing a UUID

Source

pub fn ulong(self) -> Self

Marks this column as an unsigned long (0 to 18446744073709551615)

Source

pub fn boolean(self) -> Self

Marks this column as a boolean (stored as int with 0/1 values)

Enables full text search on this (string) column

Source

pub fn json(self) -> Self

Marks this (string) column as holding JSON values

Source

pub fn array(self, item_type: &str) -> Self

Marks this (string) column as an unbounded array of item_type (e.g. “int”, “long”, “double”, “string”), i.e. array(item_type)

Source

pub fn array_n(self, item_type: &str, len: i64) -> Self

Marks this (string) column as an array of item_type holding at most len items, i.e. array(item_type, len); a len of -1 means unbounded

Source

pub fn vector(self, dimensions: usize) -> Self

Marks this (bytes) column as a vector of dimensions floats, i.e. vector(dimensions)

Source

pub fn soft_primary_key(self) -> Self

Marks this column as part of (or all of) the soft primary key

Source

pub fn compress(self, codec: &str) -> Self

Compresses this column with the given codec and optional level, i.e. compress(codec); pass e.g. “snappy” or “zstd(7)“

Source

pub fn dict(self) -> Self

Dictionary-encodes this column (charN, int, long or date columns)

Source

pub fn init_with_now(self) -> Self

Replaces empty or invalid date/time/datetime/timestamp values with NOW() on insert

Source

pub fn init_with_uuid(self) -> Self

Replaces empty or invalid UUID values with a random UUID on insert

Source

pub fn update_with_now(self) -> Self

Sets this date/time/datetime/timestamp column to NOW() on any update

Source

pub fn update_with_user(self) -> Self

Sets this charN or string column to the current user’s name on any update

Source

pub fn default_value(self, expr: &str) -> Self

Sets a default value expression, i.e. default(expr); pass e.g. “0”, “‘pending’” or “NOW()“

Source

pub fn default_sql(self, expr: &str) -> Self

Sets the SQL-syntax default expression shown in generated DDL, i.e. default_sql(expr)

The parenthesised form here follows default(expr). Use property if a server expects something else.

Source

pub fn property(self, prop: impl Into<String>) -> Self

Adds a custom property

Source

pub fn build(self) -> Vec<String>

Converts to the vector format expected by Kinetica

Trait Implementations

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more