I am a Rust beginner with decades of experience in other languages and frameworks. I like some of the basics of Rust I have learned about on a theoretical basis. I would like to try to use Rust for Postgres for simplified coding of Postgres data processing integrated with something like mio for handling I/O completion, etc.
But in PostgreSQL work, I always come back to the libpq C bindings for production-scale db work instead of simplified object frameworks because libpq as of version 9.1 supports single row mode, which is not the default way of processing returned Postgresql results. My table partitions have many billions of rows in them and a significant fraction of that could return when I query them, so using Postgres methods or frameworks that load the result entirely into memory (by not enabling single row mode) before accessing the any result are unacceptable.
See PostgreSQL: Documentation: 14: 34.6. Retrieving Query Results Row-by-Row.
Are there examples or documents that might give me a head start to doing this sort of thing in Rust? I am beginning to think I may be starting from scratch to setup the Postgres access the way I need it to behave. If so, is there something else of similar difficulty that has been integrated with mio that I might look at as a starting place. Is there an existing Postgres support integration that would be recommended to enhance for line at a time and full asynchronous support? Etc.