This Rust crate extends odbc-iter
crate functionality with ability to query Avro records and write entire ResultSet
as Avro "Object Container File" data.
Example usage
Write Avro object container file data from query.
use Odbc;
use ;
let mut connection = connect.expect;
// Configure handler with default `AvroConfiguration`.
let mut db = connection.handle_with_configuration;
// For example query all table data from database.
let data = db.query.expect;
// You can use `File` instead to write Avro object container file or any other `Write` type.
let mut buf = Vec new;
// Write all rows as uncompressed Avro object container file where rows are represented as record object named "result_set".
data.write_avro.expect;
// Now `buf` contains all rows from `sys.tables` table serialized Avro object container file.