database_reflection/metadata/
consts.rs

1#![allow(dead_code)]
2/// database, table or column charset
3pub const METADATA_CHARSET: &str = "charset";
4
5/// database, table or column collation
6pub const METADATA_COLLATION: &str = "collation";
7
8/// constraint action ON UPDATE or TIMESTAMP internal update
9pub const METADATA_ON_UPDATE: &str = "on_update";
10
11/// constraint action ON DELETE
12pub const METADATA_ON_DELETE: &str = "on_delete";
13
14/// constraint action value CASCADE
15pub const METADATA_CASCADE: &str = "cascade";
16
17/// constraint action value SET NULL
18pub const METADATA_SET_NULL: &str = "set_null";
19
20/// for numerical datatypes of columns
21pub const METADATA_FLAG_UNSIGNED: &str = "unsigned";
22
23/// for nullable columns
24pub const METADATA_FLAG_NULLABLE: &str = "nullable";
25
26/// for marking primary keys
27pub const METADATA_FLAG_PRIMARY: &str = "primary";
28
29/// for marking unique indexes
30pub const METADATA_FLAG_UNIQUE: &str = "unique";
31
32/// primary key columns are usually AUTO INCREMENT
33pub const METADATA_FLAG_AUTO_INCREMENT: &str = "auto_increment";
34
35/// TIMESTAMP DEFAULT
36pub const METADATA_FLAG_DEFAULT_CURRENT_TIMESTAMP: &str = "current_timestamp()";
37
38/// TIMESTAMP ON UPDATE trigger
39pub const METADATA_FLAG_ON_UPDATE_CURRENT_TIMESTAMP: &str = "on update current_timestamp()";