1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Executing a query as a stream of results.
//!
//! [`Datastore::run`](crate::kvs::Datastore::run) answers with every
//! statement's result at once, which means holding a whole `SELECT` in memory
//! and sending nothing until the last row is read.
//! [`Datastore::run_streaming`](crate::kvs::Datastore::run_streaming) answers
//! with [`QueryStreamItem`]s instead, so a transport can put rows on the wire as
//! the executor produces them.
//!
//! What a consumer may assume about those items — chiefly that rows are
//! provisional until their statement's terminal item arrives — is documented on
//! [`QueryStreamItem`] itself, since that contract holds wherever they came
//! from.
use Pin;
use Stream;
use ;
use Error as TypesError;
/// A query that has been parsed and is ready to stream its results.
///
/// Parsing happens before this exists, so a parse error is reported instead of
/// one, and `statement_count` is known before any result is.
/// A stream of a query's results.
pub type QueryItemStream = ;