1#![cfg_attr(not(feature = "std"), no_std)]
16
17#[cfg(feature = "alloc")]
18extern crate alloc;
19
20pub(crate) mod prelude {
22 #[cfg(feature = "std")]
24 pub use std::{
25 borrow::Cow,
26 boxed::Box,
27 collections::HashMap,
28 format,
29 string::{String, ToString},
30 vec::Vec,
31 };
32
33 #[cfg(all(feature = "alloc", not(feature = "std")))]
34 pub use alloc::{
35 borrow::Cow,
36 boxed::Box,
37 format,
38 string::{String, ToString},
39 vec::Vec,
40 };
41
42 #[cfg(all(feature = "alloc", not(feature = "std")))]
44 pub use hashbrown::HashMap;
45}
46
47pub mod builder;
48pub mod dialect;
49pub mod error;
50pub mod expr;
51pub mod helpers;
52pub mod join;
53pub mod param;
54pub mod placeholder;
55pub mod prepared;
56#[cfg(feature = "profiling")]
57pub mod profiling;
58pub mod schema;
59pub mod sql;
60pub mod traits;
61pub mod types;
62
63pub use builder::{BuilderInit, ExecutableState, OrderByClause};
65pub use dialect::{Dialect, DialectExt};
66pub use join::{Join, JoinType};
67pub use param::{OwnedParam, Param, ParamBind};
68pub use placeholder::*;
69pub use schema::OrderBy;
70pub use sql::{OwnedSQL, OwnedSQLChunk, SQL, SQLChunk, Token};
71pub use traits::*;
72
73#[macro_export]
86macro_rules! impl_try_from_int {
87 ($name:ty => $($int_type:ty),+ $(,)?) => {
88 $(
89 impl TryFrom<$int_type> for $name {
90 type Error = $crate::error::DrizzleError;
91
92 fn try_from(value: $int_type) -> ::core::result::Result<Self, Self::Error> {
93 Self::try_from(value as i64)
94 }
95 }
96 )+
97 };
98}