@@ -40,25 +40,37 @@ pub static EXPORTS_TABLE: LazyLock<TableName> =
40
40
pub static EXPORTS_BY_STATE_AND_TS_INDEX : LazyLock < IndexName > =
41
41
LazyLock :: new ( || system_index ( & EXPORTS_TABLE , "by_state_and_ts" ) ) ;
42
42
43
+ pub static EXPORTS_BY_REQUESTOR : LazyLock < IndexName > =
44
+ LazyLock :: new ( || system_index ( & EXPORTS_TABLE , "by_requestor" ) ) ;
45
+
43
46
pub static EXPORTS_STATE_FIELD : LazyLock < FieldPath > =
44
47
LazyLock :: new ( || "state" . parse ( ) . expect ( "Invalid built-in field" ) ) ;
45
48
46
49
pub static EXPORTS_TS_FIELD : LazyLock < FieldPath > =
47
50
LazyLock :: new ( || "start_ts" . parse ( ) . expect ( "Invalid built-in field" ) ) ;
48
51
52
+ static EXPORTS_REQUESTOR_FIELD : LazyLock < FieldPath > =
53
+ LazyLock :: new ( || "requestor" . parse ( ) . expect ( "Invalid built-in field" ) ) ;
54
+
49
55
pub struct ExportsTable ;
50
56
impl SystemTable for ExportsTable {
51
57
fn table_name ( & self ) -> & ' static TableName {
52
58
& EXPORTS_TABLE
53
59
}
54
60
55
61
fn indexes ( & self ) -> Vec < SystemIndex > {
56
- vec ! [ SystemIndex {
57
- name: EXPORTS_BY_STATE_AND_TS_INDEX . clone( ) ,
58
- fields: vec![ EXPORTS_STATE_FIELD . clone( ) , EXPORTS_TS_FIELD . clone( ) ]
59
- . try_into( )
60
- . unwrap( ) ,
61
- } ]
62
+ vec ! [
63
+ SystemIndex {
64
+ name: EXPORTS_BY_STATE_AND_TS_INDEX . clone( ) ,
65
+ fields: vec![ EXPORTS_STATE_FIELD . clone( ) , EXPORTS_TS_FIELD . clone( ) ]
66
+ . try_into( )
67
+ . unwrap( ) ,
68
+ } ,
69
+ SystemIndex {
70
+ name: EXPORTS_BY_REQUESTOR . clone( ) ,
71
+ fields: vec![ EXPORTS_REQUESTOR_FIELD . clone( ) ] . try_into( ) . unwrap( ) ,
72
+ } ,
73
+ ]
62
74
}
63
75
64
76
fn validate_document ( & self , document : ResolvedDocument ) -> anyhow:: Result < ( ) > {
0 commit comments