Skip to main content

holochain_sqlite/
sql.rs

1pub mod sql_cell {
2    pub const SET_VALIDATED_OPS_TO_INTEGRATED: &str =
3        include_str!("sql/cell/set_validated_ops_to_integrated.sql");
4
5    pub const ACTION_HASH_BY_PREV: &str = include_str!("sql/cell/action_hash_by_prev.sql");
6    pub const ALL_READY_ACTIVITY: &str = include_str!("sql/cell/all_ready_activity.sql");
7    pub const DELETE_ACTIONS_AFTER_SEQ: &str =
8        include_str!("sql/cell/delete_actions_after_seq.sql");
9
10    pub const SELECT_VALID_AGENT_PUB_KEY: &str =
11        include_str!("sql/cell/select_valid_agent_pub_key.sql");
12
13    pub const FETCH_PUBLISHABLE_OP: &str = include_str!("sql/cell/fetch_publishable_op.sql");
14
15    pub mod must_get_agent_activity {
16        pub const MUST_GET_AGENT_ACTIVITY: &str =
17            include_str!("sql/cell/agent_activity/must_get_agent_activity.sql");
18        pub const ACTION_HASH_TO_SEQ: &str =
19            include_str!("sql/cell/agent_activity/action_hash_to_seq.sql");
20        pub const TS_TO_SEQ: &str = include_str!("sql/cell/agent_activity/ts_to_seq.sql");
21    }
22
23    pub mod schedule {
24        pub const UPDATE: &str = include_str!("sql/cell/schedule/update.sql");
25        pub const DELETE: &str = include_str!("sql/cell/schedule/delete.sql");
26        pub const EXPIRED: &str = include_str!("sql/cell/schedule/expired.sql");
27        pub const DELETE_ALL_EPHEMERAL: &str =
28            include_str!("sql/cell/schedule/delete_all_ephemeral.sql");
29        pub const DELETE_LIVE_EPHEMERAL: &str =
30            include_str!("sql/cell/schedule/delete_live_ephemeral.sql");
31    }
32    pub mod state_dump {
33        pub const DHT_OPS_IN_INTEGRATION_LIMBO: &str =
34            include_str!("sql/cell/state_dump/dht_ops_in_integration_limbo.sql");
35        pub const DHT_OPS_INTEGRATED: &str =
36            include_str!("sql/cell/state_dump/dht_ops_integrated.sql");
37        pub const DHT_OPS_IN_VALIDATION_LIMBO: &str =
38            include_str!("sql/cell/state_dump/dht_ops_in_validation_limbo.sql");
39        pub const DHT_OPS_ROW_ID: &str = include_str!("sql/cell/state_dump/dht_ops_row_id.sql");
40    }
41
42    pub mod warrant {
43        pub const SELECT_BY_TYPE_AND_WARRANTEE: &str =
44            include_str!("sql/cell/warrant/select_by_type_and_warrantee.sql");
45    }
46}
47
48pub mod sql_dht {
49    pub const OP_HASHES_IN_TIME_SLICE: &str = include_str!("sql/dht/op_hashes_in_time_slice.sql");
50
51    pub const OP_HASHES_SINCE_TIME_BATCH: &str =
52        include_str!("sql/dht/op_hashes_since_time_batch.sql");
53
54    pub const OPS_BY_ID: &str = include_str!("sql/dht/ops_by_id.sql");
55
56    pub const CHECK_OP_IDS_PRESENT: &str = include_str!("sql/dht/check_op_ids_present.sql");
57
58    pub const EARLIEST_TIMESTAMP: &str = include_str!("sql/dht/earliest_timestamp.sql");
59
60    pub const TOTAL_OP_COUNT: &str = include_str!("sql/dht/total_op_count.sql");
61}
62
63pub mod sql_conductor {
64    pub(crate) const SELECT_NONCE: &str = include_str!("sql/conductor/nonce_already_seen.sql");
65    pub const DELETE_EXPIRED_NONCE: &str = include_str!("sql/conductor/delete_expired_nonce.sql");
66    pub const FROM_BLOCK_SPAN_WHERE_OVERLAPPING: &str =
67        include_str!("sql/conductor/from_block_span_where_overlapping.sql");
68    pub const IS_BLOCKED: &str = include_str!("sql/conductor/is_blocked.sql");
69    pub const IS_ANY_BLOCKED: &str = include_str!("sql/conductor/is_any_blocked.sql");
70    pub const SELECT_VALID_CAP_GRANT_FOR_CAP_SECRET: &str =
71        include_str!("sql/conductor/select_valid_cap_grant_for_cap_secret.sql");
72    pub const SELECT_VALID_UNRESTRICTED_CAP_GRANT: &str =
73        include_str!("sql/conductor/select_valid_unrestricted_cap_grant.sql");
74}
75
76pub(crate) mod sql_wasm {}
77
78pub mod sql_peer_meta_store {
79    pub const PRUNE: &str = include_str!("sql/peer_meta_store/prune.sql");
80
81    pub const INSERT: &str = include_str!("sql/peer_meta_store/insert.sql");
82
83    pub const GET: &str = include_str!("sql/peer_meta_store/get.sql");
84
85    pub const GET_ALL_BY_KEY: &str = include_str!("sql/peer_meta_store/get_all_by_key.sql");
86
87    pub const DELETE: &str = include_str!("sql/peer_meta_store/delete.sql");
88
89    pub const DELETE_URLS: &str = include_str!("sql/peer_meta_store/delete_urls.sql");
90
91    pub const GET_ALL_BY_URL: &str = include_str!("sql/peer_meta_store/get_all_by_url.sql");
92}