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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#![deny(warnings, missing_copy_implementations)]
#![cfg_attr(feature = "clippy", allow(needless_pass_by_value))]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(feature = "clippy", allow(option_map_unwrap_or_else, option_map_unwrap_or))]
#![cfg_attr(feature = "clippy",
warn(wrong_pub_self_convention, mut_mut, non_ascii_literal, similar_names,
unicode_not_nfc, if_not_else, items_after_statements, used_underscore_binding))]
#![deprecated(since = "1.3.0", note = "Diesel CLI can be configured to automatically run `print-schema` after running migrations. See diesel.rs/guides/configuring-diesel-cli for details.")]
#[cfg_attr(feature = "clippy", allow(useless_attribute))]
#[allow(unused_imports)]
#[macro_use]
extern crate infer_schema_macros;
#[doc(hidden)]
pub use infer_schema_macros::*;
#[macro_export]
macro_rules! infer_schema {
($database_url: expr) => {
mod __diesel_infer_schema {
#[derive(InferSchema)]
#[infer_schema_options(database_url=$database_url)]
struct _Dummy;
}
pub use self::__diesel_infer_schema::*;
};
($database_url: expr, $schema_name: expr) => {
mod __diesel_infer_schema {
#[derive(InferSchema)]
#[infer_schema_options(database_url=$database_url, schema_name=$schema_name)]
struct _Dummy;
}
pub use self::__diesel_infer_schema::*;
};
}
#[macro_export]
macro_rules! infer_table_from_schema {
($database_url: expr, $table_name: expr) => {
#[derive(InferTableFromSchema)]
#[infer_table_from_schema_options(database_url=$database_url, table_name=$table_name)]
struct __DieselInferTableFromSchema;
}
}