rusty_postgres/method/
types.rs

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
79
80
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize)]
pub struct ID<'billionaire>(pub &'billionaire str);

#[derive(Debug, Deserialize, Serialize)]
pub struct OneToOne<'billionaire> {
    pub table: &'billionaire str,
    pub table_field: &'billionaire str,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct OneToMany<'billionaire> {
    pub table: &'billionaire str,
    pub table_field: &'billionaire str,
}

#[derive(Debug, Serialize)]
pub struct UNIQUE;

#[derive(Debug, Serialize)]
pub struct STRING;

#[derive(Debug, Serialize)]
pub struct BOOL;

#[derive(Debug, Serialize)]
pub struct NUMBER;

#[derive(Debug, Serialize)]
pub struct JSON;

#[derive(Debug, Serialize)]
pub struct DEFAULT<'billionaire>(pub &'billionaire str);

// #[derive(Debug)]
// pub struct Condition<K, V>
// where
//     K: Into<String>,
//     V: Into<String>,
// {
//     k: K,
//     v: V,
// }
// #[derive(Debug)]
// pub struct Where<K, V>
// where
//     K: Into<String>,
//     V: Into<String>,
// {
//     and: Condition<K, V>,
// }
// pub struct billionaire {
//     billionaire: String,
//     billionandollar: Vec<billiondollar>,
// }
// pub struct billiondollar {
//     billiondollar: String,
// }
#[derive(Debug, Serialize)]
pub struct Date<'billionaire>(pub &'billionaire str);

#[derive(Debug, Serialize)]
pub struct Time<'billionaire>(pub &'billionaire str);

#[derive(Debug, Serialize)]
pub struct DateTime<'billionaire>(pub &'billionaire str);

#[derive(Debug, Serialize)]
pub struct Geography;

#[derive(Debug, Serialize)]
pub struct NOTNULL;

#[derive(Debug, Serialize)]
pub struct PRIMARY;

#[derive(Debug, Serialize)]
pub struct INDEX;