PgDataType<Dart extends Object> enum

Supported data types.

Inheritance

Constructors

PgDataType(int? oid, {String? nameForSubstitution})
const

Values

unknownType → const PgDataType<Object>

Used to represent a type not yet understood by this package.

const PgDataType<Object>(null)
text → const PgDataType<String>

Must be a String.

const PgDataType<String>(25, nameForSubstitution: 'text')
integer → const PgDataType<int>

Must be an int (4-byte integer)

const PgDataType<int>(23, nameForSubstitution: 'int4')
smallInteger → const PgDataType<int>

Must be an int (2-byte integer)

const PgDataType<int>(21, nameForSubstitution: 'int2')
bigInteger → const PgDataType<int>

Must be an int (8-byte integer)

const PgDataType<int>(20, nameForSubstitution: 'int8')
serial → const PgDataType<Object>

Must be an int (autoincrementing 4-byte integer)

const PgDataType(null, nameForSubstitution: 'int4')
bigSerial → const PgDataType<Object>

Must be an int (autoincrementing 8-byte integer)

const PgDataType(null, nameForSubstitution: 'int8')
real → const PgDataType<double>

Must be a double (32-bit floating point value)

const PgDataType<core.double>(700, nameForSubstitution: 'float4')
double → const PgDataType<double>

Must be a double (64-bit floating point value)

const PgDataType<core.double>(701, nameForSubstitution: 'float8')
boolean → const PgDataType<bool>

Must be a bool

const PgDataType<bool>(16, nameForSubstitution: 'boolean')
timestampWithoutTimezone → const PgDataType<DateTime>

Must be a DateTime (microsecond date and time precision)

const PgDataType<DateTime>(1114, nameForSubstitution: 'timestamp')
timestampWithTimezone → const PgDataType<DateTime>

Must be a DateTime (microsecond date and time precision)

const PgDataType<DateTime>(1184, nameForSubstitution: 'timestamptz')
interval → const PgDataType<Duration>

Must be a Duration

const PgDataType<Duration>(1186, nameForSubstitution: 'interval')
numeric → const PgDataType<Object>

An arbitrary-precision number.

This library supports encoding numbers in a textual format, or when passed as int or double. When decoding values, numeric types are always returned as string.

const PgDataType<Object>(1700, nameForSubstitution: 'numeric')
date → const PgDataType<DateTime>

Must be a DateTime (contains year, month and day only)

const PgDataType<DateTime>(1082, nameForSubstitution: 'date')
jsonb → const PgDataType<Object>

Must be encodable via json.encode.

Values will be encoded via json.encode before being sent to the database.

const PgDataType(3802, nameForSubstitution: 'jsonb')
json → const PgDataType<Object>

Must be encodable via core.json.encode.

Values will be encoded via core.json.encode before being sent to the database.

const PgDataType(114, nameForSubstitution: 'json')
byteArray → const PgDataType<List<int>>

Must be a List of int.

Each element of the list must fit into a byte (0-255).

const PgDataType<List<int>>(17, nameForSubstitution: 'bytea')
name → const PgDataType<String>

Must be a String

Used for internal pg structure names

const PgDataType<String>(19, nameForSubstitution: 'name')
uuid → const PgDataType<String>

Must be a String.

Must contain 32 hexadecimal characters. May contain any number of '-' characters. When returned from database, format will be xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

const PgDataType<String>(2950, nameForSubstitution: 'uuid')
point → const PgDataType<PgPoint>

Must be a PgPoint

const PgDataType<PgPoint>(600, nameForSubstitution: 'point')
booleanArray → const PgDataType<List<bool>>

Must be a List<bool>

const PgDataType<List<bool>>(1000, nameForSubstitution: '_bool')
integerArray → const PgDataType<List<int>>

Must be a List<int>

const PgDataType<List<int>>(1007, nameForSubstitution: '_int4')
bigIntegerArray → const PgDataType<List<int>>

Must be a List<int>

const PgDataType<List<int>>(1016, nameForSubstitution: '_int8')
textArray → const PgDataType<List<String>>

Must be a List<String>

const PgDataType<List<String>>(1009, nameForSubstitution: '_text')
doubleArray → const PgDataType<List<double>>

Must be a List<double>

const PgDataType<List<core.double>>(1022, nameForSubstitution: '_float8')
varChar → const PgDataType<String>

Must be a String

const PgDataType<String>(1043, nameForSubstitution: 'varchar')
varCharArray → const PgDataType<List<String>>

Must be a List<String>

const PgDataType<List<String>>(1015, nameForSubstitution: '_varchar')
jsonbArray → const PgDataType<List>

Must be a List of encodable objects

const PgDataType<List>(3807, nameForSubstitution: '_jsonb')
regtype → const PgDataType<PgDataType<Object>>

Must be a PgDataType.

const PgDataType<PgDataType>(2206, nameForSubstitution: 'regtype')
voidType → const PgDataType<Object>

Impossible to bind to, always null when read.

const PgDataType<Object>(2278)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
nameForSubstitution String?
The name of this type as considered by PgSql.map.
final
oid int?
The object ID of this data type.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

bySubstitutionName Map<String, PgDataType<Object>>
final
byTypeOid Map<int, PgDataType<Object>>
final

Constants

values → const List<PgDataType<Object>>
A constant List of the values in this enum, in order of their declaration.