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