tokio-rs / rdbc

Rust DataBase Connectivity (RDBC) :: Common Rust API for database drivers
Apache License 2.0
569 stars 25 forks source link

Statement should support executing query that returns multiple result sets #56

Open andygrove opened 4 years ago

andygrove commented 4 years ago

Some databases support queries that return multiple result sets. This could be modeled roughly like this pseudo code?

trait Statement {
  fn execute_query() -> impl Stream<ResultSet>;
}

trait ResultSet {
  fn get_meta_data() -> ResultSetMetaData;
  fn get_rows() -> impl Stream<Row>;
}