Data Types¶
This module contains classes for handling the different logical types that occur in databases.
All data type constructors take a nullable: bool
parameter whose default
value is True
.
core
¶
Classes¶
Array
¶
Binary
¶
Bases: Variadic
, Singleton
A type representing a sequence of bytes.
Notes¶
Some databases treat strings and blobs of equally, and some do not.
For example, Impala doesn't make a distinction between string and binary
types but PostgreSQL has a TEXT
type and a BYTEA
type which are
distinct types that have different behavior.
Bounds
¶
DataType
¶
Decimal
¶
Bases: Numeric
, Parametric
Fixed-precision decimal values.
Floating
¶
GeoSpatial
¶
Int16
¶
Int32
¶
Int64
¶
Int8
¶
Integer
¶
Interval
¶
Bases: Parametric
Interval values.
Attributes¶
resolution
property
¶
The interval unit's name.
unit = optional(map_to(__valid_units__), default='s')
class-attribute
¶
The time unit of the interval.
value_type = optional(all_of([datatype, instance_of(Integer)]), default=Int32())
class-attribute
¶
The underlying type of the stored values.
LineString
¶
Map
¶
MultiLineString
¶
MultiPoint
¶
MultiPolygon
¶
Point
¶
Polygon
¶
Bases: GeoSpatial
A set of one or more closed line strings.
The first line string represents the shape (external ring) and the rest represent holes in that shape (internal rings).
Set
¶
SignedInteger
¶
String
¶
Struct
¶
Bases: Parametric
, MapSet
Structured values.
Timestamp
¶
Bases: Temporal
, Parametric
Timestamp values.