Module spin_sdk::pg

source ·
Expand description

Implementation of the spin postgres db interface. Conversions between Rust, WIT and Postgres types.

§Types

Rust typeWIT (db-value)Postgres type(s)
boolboolean(bool)BOOL
i16int16(s16)SMALLINT, SMALLSERIAL, INT2
i32int32(s32)INT, SERIAL, INT4
i64int64(s64)BIGINT, BIGSERIAL, INT8
f32floating32(float32)REAL, FLOAT4
f64floating64(float64)DOUBLE PRECISION, FLOAT8
Stringstr(string)VARCHAR, CHAR(N), TEXT
Vec<u8>binary(list<u8>)BYTEA

Structs§

Enums§

Traits§

  • A type that can be decoded from the database.

Type Aliases§