@@ -22,7 +22,21 @@ use std::collections::HashSet;
2222
2323use crate :: error:: Result ;
2424use crate :: options:: { self , * } ;
25- use crate :: PartitionedResult ;
25+
26+ /// Each data partition is described by an opaque byte array and can be
27+ /// retrieved with [Connection::read_partition].
28+ pub type Partitions = Vec < Vec < u8 > > ;
29+
30+ /// A partitioned result set as returned by [Statement::execute_partitions].
31+ #[ derive( Debug , PartialEq , Eq ) ]
32+ pub struct PartitionedResult {
33+ /// The result partitions.
34+ pub partitions : Partitions ,
35+ /// The schema of the result set.
36+ pub schema : Schema ,
37+ /// The number of rows affected if known, else -1.
38+ pub rows_affected : i64 ,
39+ }
2640
2741/// Ability to configure an object by setting/getting options.
2842#[ trait_variant:: make( AsyncOptionable : Send ) ]
@@ -362,7 +376,10 @@ pub trait LocalAsyncConnection: LocalAsyncOptionable<Option = OptionConnection>
362376 /// # Arguments
363377 ///
364378 /// - `partition` - The partition descriptor.
365- async fn read_partition ( & self , partition : & [ u8 ] ) -> Result < impl RecordBatchReader + Send > ;
379+ async fn read_partition (
380+ & self ,
381+ partition : & [ u8 ] ,
382+ ) -> Result < impl RecordBatchReader + Send + ' static > ;
366383}
367384
368385/// A handle to an async ADBC statement.
0 commit comments