Registry / database / postgres-types

postgres-types

JSON →
library0.2.14rscratesunverified

Conversions between Rust and Postgres values

# Cargo.toml [dependencies] postgres-types = "0.2.14"
INSTALL
IMPORT
SIG · POSTGRES-TYPES
P
postgres-types
databaserustv0.2.14
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ToSql
use postgres_types::ToSql;

Demonstrates the ToSql trait for converting a Rust i32 to a Postgres INT4.

use postgres_types::{ToSql, Type}; fn main() { let value: i32 = 42; let sql_type = Type::INT4; // This trait is typically used with the postgres crate println!("Value: {}, Type: {:?}", value, sql_type); }
Debug
Known issues
gotchaRequires the postgres crate for actual database interaction
fix
Add postgres to your dependencies and use its Client to execute queries
affects: *
Upgrade
Version history
0.2.14latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
postgres-types — cargo add postgres-types · libregistry