openapi-rust-sdk icon indicating copy to clipboard operation
openapi-rust-sdk copied to clipboard

Saving Openapi SDK results into SQLx Postgres models

Open francescobianco opened this issue 1 year ago • 0 comments

I want to fetch Accounts (for my CRM, eg Companies, Business names, VAT Codes) from SDK and insert into Postgres:

let products = client.get_products().await?;
sqlx::query!("INSERT INTO products ...").execute(&pool).await?;

How do I efficiently map SDK structs to SQLx query parameters without writing boilerplate conversion code?

francescobianco avatar Oct 01 '25 09:10 francescobianco