@@ -169,7 +169,11 @@ fn row_to_subscription(row: &Row) -> Result<SubscriptionData> {
169169 let client_filter_op: Option < String > = row. get ( "client_filter_op" ) ?;
170170
171171 let client_filter = match client_filter_op {
172- Some ( op) => Some ( ClientFilter :: from ( op, row. get ( "client_filter_value" ) ?) ?) ,
172+ Some ( op) => {
173+ let client_filter_type: Option < _ > = row. get ( "client_filter_type" ) ?;
174+ let client_filter_type = client_filter_type. unwrap_or ( "KerberosPrinc" . to_owned ( ) ) ;
175+ Some ( ClientFilter :: from ( op, client_filter_type, row. get ( "client_filter_flags" ) ?, row. get ( "client_filter_value" ) ?) ?)
176+ } ,
173177 None => None
174178 } ;
175179
@@ -553,6 +557,8 @@ impl Database for SQLiteDatabase {
553557 async fn store_subscription ( & self , subscription : & SubscriptionData ) -> Result < ( ) > {
554558 let subscription = subscription. clone ( ) ;
555559 let client_filter_op: Option < String > = subscription. client_filter ( ) . map ( |f| f. operation ( ) . to_string ( ) ) ;
560+ let client_filter_type = subscription. client_filter ( ) . map ( |f| f. kind ( ) . to_string ( ) ) ;
561+ let client_filter_flags = subscription. client_filter ( ) . map ( |f| f. flags ( ) . to_string ( ) ) ;
556562 let client_filter_value = subscription. client_filter ( ) . and_then ( |f| f. targets_to_opt_string ( ) ) ;
557563
558564 let count = self
@@ -564,12 +570,12 @@ impl Database for SQLiteDatabase {
564570 r#"INSERT INTO subscriptions (uuid, version, revision, name, uri, query,
565571 heartbeat_interval, connection_retry_count, connection_retry_interval,
566572 max_time, max_elements, max_envelope_size, enabled, read_existing_events, content_format,
567- ignore_channel_error, client_filter_op, client_filter_value, outputs, locale,
573+ ignore_channel_error, client_filter_op, client_filter_type, client_filter_flags, client_filter_value, outputs, locale,
568574 data_locale)
569575 VALUES (:uuid, :version, :revision, :name, :uri, :query,
570576 :heartbeat_interval, :connection_retry_count, :connection_retry_interval,
571577 :max_time, :max_elements, :max_envelope_size, :enabled, :read_existing_events, :content_format,
572- :ignore_channel_error, :client_filter_op, :client_filter_value, :outputs,
578+ :ignore_channel_error, :client_filter_op, :client_filter_type, :client_filter_flags, : client_filter_value, :outputs,
573579 :locale, :data_locale)
574580 ON CONFLICT (uuid) DO UPDATE SET
575581 version = excluded.version,
@@ -588,6 +594,8 @@ impl Database for SQLiteDatabase {
588594 content_format = excluded.content_format,
589595 ignore_channel_error = excluded.ignore_channel_error,
590596 client_filter_op = excluded.client_filter_op,
597+ client_filter_type = excluded.client_filter_type,
598+ client_filter_flags = excluded.client_filter_flags,
591599 client_filter_value = excluded.client_filter_value,
592600 outputs = excluded.outputs,
593601 locale = excluded.locale,
@@ -610,6 +618,8 @@ impl Database for SQLiteDatabase {
610618 ":content_format" : subscription. content_format( ) . to_string( ) ,
611619 ":ignore_channel_error" : subscription. ignore_channel_error( ) ,
612620 ":client_filter_op" : client_filter_op,
621+ ":client_filter_type" : client_filter_type,
622+ ":client_filter_flags" : client_filter_flags,
613623 ":client_filter_value" : client_filter_value,
614624 ":outputs" : serde_json:: to_string( subscription. outputs( ) ) ?,
615625 ":locale" : subscription. locale( ) ,
0 commit comments