sqlx_core_oldapi/
lib.rs

1//! Core of SQLx, the rust SQL toolkit.
2//! Not intended to be used directly.
3#![recursion_limit = "512"]
4#![warn(future_incompatible, rust_2018_idioms)]
5#![allow(clippy::needless_doctest_main, clippy::type_complexity, dead_code)]
6// Note: Cast warnings are allowed on a case-by-case basis with explicit #[allow(...)]
7// This ensures we're aware of potential issues with numeric conversions
8// See `clippy.toml` at the workspace root
9#![deny(clippy::disallowed_methods)]
10//
11// Allows an API be documented as only available in some specific platforms.
12// <https://doc.rust-lang.org/unstable-book/language-features/doc-cfg.html>
13#![cfg_attr(docsrs, feature(doc_cfg))]
14//
15// When compiling with support for SQLite we must allow some unsafe code in order to
16// interface with the inherently unsafe C module. This unsafe code is contained
17// to the sqlite module.
18#![cfg_attr(feature = "sqlite", deny(unsafe_code))]
19#![cfg_attr(not(feature = "sqlite"), forbid(unsafe_code))]
20
21#[cfg(feature = "bigdecimal")]
22extern crate bigdecimal_ as bigdecimal;
23
24#[macro_use]
25mod ext;
26
27#[macro_use]
28pub mod error;
29
30#[macro_use]
31pub mod arguments;
32
33#[macro_use]
34pub mod pool;
35
36pub mod connection;
37
38#[macro_use]
39pub mod transaction;
40
41#[macro_use]
42pub mod encode;
43
44#[macro_use]
45pub mod decode;
46
47#[macro_use]
48pub mod types;
49
50#[macro_use]
51pub mod query;
52
53#[macro_use]
54pub mod acquire;
55
56#[macro_use]
57pub mod column;
58
59#[macro_use]
60pub mod statement;
61
62mod common;
63pub use either::Either;
64pub mod database;
65pub mod describe;
66pub mod executor;
67pub mod from_row;
68mod io;
69mod logger;
70mod net;
71pub mod query_as;
72pub mod query_builder;
73pub mod query_scalar;
74pub mod row;
75pub mod type_info;
76pub mod value;
77
78#[cfg(feature = "migrate")]
79pub mod migrate;
80
81#[cfg(all(
82    any(
83        feature = "postgres",
84        feature = "mysql",
85        feature = "mssql",
86        feature = "sqlite",
87        feature = "odbc"
88    ),
89    feature = "any"
90))]
91pub mod any;
92
93#[cfg(feature = "postgres")]
94#[cfg_attr(docsrs, doc(cfg(feature = "postgres")))]
95pub mod postgres;
96
97#[cfg(feature = "sqlite")]
98#[cfg_attr(docsrs, doc(cfg(feature = "sqlite")))]
99pub mod sqlite;
100
101#[cfg(feature = "mysql")]
102#[cfg_attr(docsrs, doc(cfg(feature = "mysql")))]
103pub mod mysql;
104
105#[cfg(feature = "mssql")]
106#[cfg_attr(docsrs, doc(cfg(feature = "mssql")))]
107pub mod mssql;
108
109#[cfg(feature = "odbc")]
110#[cfg_attr(docsrs, doc(cfg(feature = "odbc")))]
111pub mod odbc;
112
113// Implements test support with automatic DB management.
114#[cfg(feature = "migrate")]
115pub mod testing;
116
117pub use sqlx_rt::test_block_on;
118
119/// sqlx uses ahash for increased performance, at the cost of reduced DoS resistance.
120#[allow(unused_imports)]
121use ahash::AHashMap as HashMap;
122//type HashMap<K, V> = std::collections::HashMap<K, V, ahash::RandomState>;