Line data Source code
1 : // @generated automatically by Diesel CLI.
2 :
3 : pub mod sql_types {
4 : #[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
5 : #[diesel(postgres_type(name = "pg_lsn", schema = "pg_catalog"))]
6 : pub struct PgLsn;
7 : }
8 :
9 : diesel::table! {
10 : controllers (address, started_at) {
11 : address -> Varchar,
12 : started_at -> Timestamptz,
13 : }
14 0 : }
15 :
16 : diesel::table! {
17 : hadron_safekeepers (sk_node_id) {
18 : sk_node_id -> Int8,
19 : listen_http_addr -> Varchar,
20 : listen_http_port -> Int4,
21 : listen_pg_addr -> Varchar,
22 : listen_pg_port -> Int4,
23 : }
24 0 : }
25 :
26 : diesel::table! {
27 : hadron_timeline_safekeepers (timeline_id, sk_node_id) {
28 : timeline_id -> Varchar,
29 : sk_node_id -> Int8,
30 : legacy_endpoint_id -> Nullable<Uuid>,
31 : }
32 0 : }
33 :
34 : diesel::table! {
35 : metadata_health (tenant_id, shard_number, shard_count) {
36 : tenant_id -> Varchar,
37 : shard_number -> Int4,
38 : shard_count -> Int4,
39 : healthy -> Bool,
40 : last_scrubbed_at -> Timestamptz,
41 : }
42 0 : }
43 :
44 : diesel::table! {
45 : nodes (node_id) {
46 : node_id -> Int8,
47 : scheduling_policy -> Varchar,
48 : listen_http_addr -> Varchar,
49 : listen_http_port -> Int4,
50 : listen_pg_addr -> Varchar,
51 : listen_pg_port -> Int4,
52 : availability_zone_id -> Varchar,
53 : listen_https_port -> Nullable<Int4>,
54 : lifecycle -> Varchar,
55 : listen_grpc_addr -> Nullable<Varchar>,
56 : listen_grpc_port -> Nullable<Int4>,
57 : }
58 0 : }
59 :
60 : diesel::table! {
61 : safekeeper_timeline_pending_ops (tenant_id, timeline_id, sk_id) {
62 : sk_id -> Int8,
63 : tenant_id -> Varchar,
64 : timeline_id -> Varchar,
65 : generation -> Int4,
66 : op_kind -> Varchar,
67 : }
68 0 : }
69 :
70 : diesel::table! {
71 : safekeepers (id) {
72 : id -> Int8,
73 : region_id -> Text,
74 : version -> Int8,
75 : host -> Text,
76 : port -> Int4,
77 : http_port -> Int4,
78 : availability_zone_id -> Text,
79 : scheduling_policy -> Varchar,
80 : https_port -> Nullable<Int4>,
81 : }
82 0 : }
83 :
84 : diesel::table! {
85 : tenant_shards (tenant_id, shard_number, shard_count) {
86 : tenant_id -> Varchar,
87 : shard_number -> Int4,
88 : shard_count -> Int4,
89 : shard_stripe_size -> Int4,
90 : generation -> Nullable<Int4>,
91 : generation_pageserver -> Nullable<Int8>,
92 : placement_policy -> Varchar,
93 : splitting -> Int2,
94 : config -> Text,
95 : scheduling_policy -> Varchar,
96 : preferred_az_id -> Nullable<Varchar>,
97 : }
98 0 : }
99 :
100 : diesel::table! {
101 : timeline_imports (tenant_id, timeline_id) {
102 : tenant_id -> Varchar,
103 : timeline_id -> Varchar,
104 : shard_statuses -> Jsonb,
105 : }
106 0 : }
107 :
108 : diesel::table! {
109 : use diesel::sql_types::*;
110 : use super::sql_types::PgLsn;
111 :
112 : timelines (tenant_id, timeline_id) {
113 : tenant_id -> Varchar,
114 : timeline_id -> Varchar,
115 : start_lsn -> PgLsn,
116 : generation -> Int4,
117 : sk_set -> Array<Nullable<Int8>>,
118 : new_sk_set -> Nullable<Array<Nullable<Int8>>>,
119 : cplane_notified_generation -> Int4,
120 : deleted_at -> Nullable<Timestamptz>,
121 : sk_set_notified_generation -> Int4,
122 : }
123 0 : }
124 :
125 : diesel::allow_tables_to_appear_in_same_query!(
126 : controllers,
127 : hadron_safekeepers,
128 : hadron_timeline_safekeepers,
129 : metadata_health,
130 : nodes,
131 : safekeeper_timeline_pending_ops,
132 : safekeepers,
133 : tenant_shards,
134 : timeline_imports,
135 : timelines,
136 : );
|