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 : metadata_health (tenant_id, shard_number, shard_count) {
18 : tenant_id -> Varchar,
19 : shard_number -> Int4,
20 : shard_count -> Int4,
21 : healthy -> Bool,
22 : last_scrubbed_at -> Timestamptz,
23 : }
24 0 : }
25 :
26 : diesel::table! {
27 : nodes (node_id) {
28 : node_id -> Int8,
29 : scheduling_policy -> Varchar,
30 : listen_http_addr -> Varchar,
31 : listen_http_port -> Int4,
32 : listen_pg_addr -> Varchar,
33 : listen_pg_port -> Int4,
34 : availability_zone_id -> Varchar,
35 : listen_https_port -> Nullable<Int4>,
36 : lifecycle -> Varchar,
37 : listen_grpc_addr -> Nullable<Varchar>,
38 : listen_grpc_port -> Nullable<Int4>,
39 : }
40 0 : }
41 :
42 : diesel::table! {
43 : safekeeper_timeline_pending_ops (tenant_id, timeline_id, sk_id) {
44 : sk_id -> Int8,
45 : tenant_id -> Varchar,
46 : timeline_id -> Varchar,
47 : generation -> Int4,
48 : op_kind -> Varchar,
49 : }
50 0 : }
51 :
52 : diesel::table! {
53 : safekeepers (id) {
54 : id -> Int8,
55 : region_id -> Text,
56 : version -> Int8,
57 : host -> Text,
58 : port -> Int4,
59 : http_port -> Int4,
60 : availability_zone_id -> Text,
61 : scheduling_policy -> Varchar,
62 : https_port -> Nullable<Int4>,
63 : }
64 0 : }
65 :
66 : diesel::table! {
67 : tenant_shards (tenant_id, shard_number, shard_count) {
68 : tenant_id -> Varchar,
69 : shard_number -> Int4,
70 : shard_count -> Int4,
71 : shard_stripe_size -> Int4,
72 : generation -> Nullable<Int4>,
73 : generation_pageserver -> Nullable<Int8>,
74 : placement_policy -> Varchar,
75 : splitting -> Int2,
76 : config -> Text,
77 : scheduling_policy -> Varchar,
78 : preferred_az_id -> Nullable<Varchar>,
79 : }
80 0 : }
81 :
82 : diesel::table! {
83 : timeline_imports (tenant_id, timeline_id) {
84 : tenant_id -> Varchar,
85 : timeline_id -> Varchar,
86 : shard_statuses -> Jsonb,
87 : }
88 0 : }
89 :
90 : diesel::table! {
91 : use diesel::sql_types::*;
92 : use super::sql_types::PgLsn;
93 :
94 : timelines (tenant_id, timeline_id) {
95 : tenant_id -> Varchar,
96 : timeline_id -> Varchar,
97 : start_lsn -> PgLsn,
98 : generation -> Int4,
99 : sk_set -> Array<Nullable<Int8>>,
100 : new_sk_set -> Nullable<Array<Nullable<Int8>>>,
101 : cplane_notified_generation -> Int4,
102 : deleted_at -> Nullable<Timestamptz>,
103 : }
104 0 : }
105 :
106 : diesel::allow_tables_to_appear_in_same_query!(
107 : controllers,
108 : metadata_health,
109 : nodes,
110 : safekeeper_timeline_pending_ops,
111 : safekeepers,
112 : tenant_shards,
113 : timeline_imports,
114 : timelines,
115 : );
|