Expand description
Zero-sized SQL type markers for the PostgreSQL dialect.
Each marker stands for one SQL type at compile time; it carries no length,
precision or enum values (see PostgreSQLType for those). The traits in
crate::sql say which markers can be compared, assigned, or used in
arithmetic. The Rust types listed are the default value mappings.
Structsยง
- Any
- Untyped SQL, such as a raw
SQLfragment. Compatible with everyPostgreSQLmarker. - BitString
bit(n)/bit varying(n): a bit string.- Boolean
boolean. Rustbool.- Bytea
bytea: raw bytes. Rust&[u8],Vec<u8>.- Char
char(n): fixed-length, blank-padded text.- Cidr
cidr: an IPv4 or IPv6 network.- Circle
circle.- Date
date.- Enum
- A user-defined enum type (
CREATE TYPE ... AS ENUM). - Float4
real(float4): 32-bit float. Rustf32.- Float8
double precision(float8): 64-bit float. Rustf64.- Inet
inet: an IPv4 or IPv6 host address, with optional netmask.- Int2
smallint(int2): 16-bit integer. Rusti16.- Int4
integer(int4): 32-bit integer. Rusti32.- Int8
bigint(int8): 64-bit integer. Rusti64.- Interval
interval: a time span.- Json
json: JSON stored as text.- Jsonb
jsonb: binary JSON; supports containment and key operators.- Line
line: an infinite geometric line.- Line
Segment lseg: a line segment.- Line
String path: an open or closed geometric path.- MacAddr
macaddr: a 6-byte MAC address.- MacAddr8
macaddr8: an 8-byte MAC address.- Numeric
numeric(p, s): exact decimal.- Point
point: a geometric point.- Polygon
polygon.- Rect
box: a rectangle.- Text
text: unlimited text. Rust&str,String.- Time
time(without time zone).- Timestamp
timestamp(without time zone).- Timestamptz
timestamp with time zone.- Timetz
time with time zone.- Uuid
uuid.- Varchar
varchar(n): text with a length limit.