pub enum ColumnType {
Show 32 variants
String,
Varchar,
Text,
MediumText,
LongText,
TinyInteger,
SmallInteger,
Integer,
BigInteger,
Float,
Double,
Decimal,
Boolean,
Datetime,
Timestamp,
Json,
Binary,
Enum,
Point,
Linestring,
Polygon,
Vector,
Id,
Uuid,
Uuid7,
Object,
Relationship,
Serial,
BigSerial,
SmallSerial,
Array,
Tuple,
}Expand description
The portable type of a column; each dialect compiles it to its own SQL type (or BSON type).
PHP: Utopia\Query\Schema\ColumnType.
Variants§
String
A bounded string (VARCHAR(n)).
Varchar
A bounded string (VARCHAR(n)).
Text
Text.
MediumText
Medium text (MEDIUMTEXT on MySQL).
LongText
Long text (LONGTEXT on MySQL).
TinyInteger
An 8-bit integer.
SmallInteger
A 16-bit integer.
Integer
A 32-bit integer.
BigInteger
A 64-bit integer.
Float
A double-precision float.
Double
A double-precision float.
Decimal
A fixed-point decimal.
Boolean
A boolean.
Datetime
A date and time.
Timestamp
A timestamp.
Json
JSON.
Binary
Binary data.
Enum
One of a list of values.
Point
A geometry point.
Linestring
A geometry line string.
Polygon
A geometry polygon.
Vector
A vector of floats.
Id
An identifier (a 64-bit integer).
Uuid
A UUID.
Uuid7
A UUIDv7, stored as a 36-character string.
Object
A JSON object.
Relationship
A relationship key (a string).
Serial
An auto-incrementing integer.
BigSerial
An auto-incrementing big integer.
SmallSerial
An auto-incrementing small integer.
Array
A ClickHouse Array(T).
Tuple
A ClickHouse Tuple(...).
Implementations§
Source§impl ColumnType
impl ColumnType
Sourcepub const CASES: &'static [ColumnType]
pub const CASES: &'static [ColumnType]
Every case, in declaration order.
PHP: cases().
Sourcepub const PHP_CLASS: &'static str = "Utopia\\Query\\Schema\\ColumnType"
pub const PHP_CLASS: &'static str = "Utopia\\Query\\Schema\\ColumnType"
The PHP class of this enumeration.
Sourcepub fn try_from_value(value: &str) -> Option<Self>
pub fn try_from_value(value: &str) -> Option<Self>
The case with backing value value, if any.
PHP: tryFrom().
Sourcepub fn from_value(value: &str) -> Result<Self, Error>
pub fn from_value(value: &str) -> Result<Self, Error>
The case with backing value value.
PHP: from(), which throws ValueError (Error::InvalidValue) with the same message.
Trait Implementations§
Source§impl Clone for ColumnType
impl Clone for ColumnType
impl Copy for ColumnType
Source§impl Debug for ColumnType
impl Debug for ColumnType
Source§impl Display for ColumnType
impl Display for ColumnType
impl Eq for ColumnType
Source§impl Hash for ColumnType
impl Hash for ColumnType
Source§impl PartialEq for ColumnType
impl PartialEq for ColumnType
impl StructuralPartialEq for ColumnType
Auto Trait Implementations§
impl Forget for ColumnType
impl Freeze for ColumnType
impl Move for ColumnType
impl RefUnwindSafe for ColumnType
impl Send for ColumnType
impl Sync for ColumnType
impl Unpin for ColumnType
impl UnsafeUnpin for ColumnType
impl UnwindSafe for ColumnType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.