Quantcast
Channel: How to parse a PostgreSQL Numeric type to Rust-native ones upon request? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by rtviii for How to parse a PostgreSQL Numeric type to Rust-native...

Use something like decimal instead of the native data types: it impements FromSql and ToSql which are not in fact implemented for regular rust's numerical types and SQL's NUMERIC. This is due to...

View Article



How to parse a PostgreSQL Numeric type to Rust-native ones upon request?

Relevant code is this:use chrono::{DateTime, Utc}; // 0.4.10use postgres::{Client, NoTls, Config, types::{FromSql, Type}};//...for row in client.query("SELECT * FROM pricetable;", &[])? { let...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images