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
55
56
57
58
59
60
pub use Client;
pub use ;
pub use Config;
pub use ;
pub use ;
pub use Executor;
pub use ;
pub use RowStream;
pub use ;
pub use ;
// The crates whose types appear in this crate's public API are re-exported, so
// callers can reach them at a version that is guaranteed to match. Binding a
// `chrono::DateTime` or a `uuid::Uuid` only type-checks against the exact
// version `tdsql` was built with; a second copy in the dependency graph
// produces the notoriously opaque "expected `Uuid`, found `Uuid`" error.
//
// This follows Effective Rust item 24 ("re-export dependencies whose types
// appear in your API") and matches `sqlx::types`. The trade-off is real and
// deliberate: it couples `tdsql`'s major version to these three, so a breaking
// release of any of them forces one here. All three are mature and moving
// slowly, which is what makes that price acceptable.
/// The `chrono` version this crate binds against -- `tdsql::chrono::Utc`.
///
/// Its types appear in the public API as [`DataValue::Date`],
/// [`DataValue::Time`], [`DataValue::DateTime`] and
/// [`DataValue::DateTimeOffset`].
pub use chrono;
/// The `rust_decimal` version this crate binds against.
///
/// Its [`Decimal`](rust_decimal::Decimal) is the public API's
/// [`DataValue::Decimal`].
pub use rust_decimal;
/// The `uuid` version this crate binds against -- `tdsql::uuid::Uuid`.
///
/// Its [`Uuid`](uuid::Uuid) is the public API's [`DataValue::Guid`], which is
/// how SQL Server's `uniqueidentifier` is read and bound.
pub use uuid;