#postgresql #sql #query #tokio-postgres #generator

cornucopia_client

Generic client trait for Cornucopia users

3 unstable releases

0.2.3 Aug 1, 2022
0.2.2 May 6, 2022
0.2.1 May 5, 2022
0.2.0 May 5, 2022
0.1.0 Apr 20, 2022

#2768 in Database interfaces

40 downloads per month

MIT license

13KB
264 lines

Cornucopia

Generate type checked Rust from your SQL


WARNING: This crate is compatible with Cornucopia up to version 0.7 only. It will no longer be maintained or updated. If you are looking for the most recent clients, you can find them here (sync version) and here (async version).


This crate is a small library exposing Cornucopia's GenericClient. You probably need this if you're a Cornucopia user.

The GenericClient is an abstraction over four types of connections (deadpool_postgres::Client, deadpool_postgres::Transaction, tokio_postgres::Client, tokio_postgres::Transaction). Its meant to allow you to mix-and-match these connection types in Cornucopia Queries.

non-pooled pooled
single-statement tokio_postgres::Client deadpool_postgres::Client
multi-statement tokio_postgres::Transaction deadpool_postgres::Transaction

Dependencies

~8–19MB
~321K SLoC