@@ -876,17 +876,6 @@ pub enum Expr {
876876 IsDistinctFrom ( Box < Expr > , Box < Expr > ) ,
877877 /// `IS NOT DISTINCT FROM` operator
878878 IsNotDistinctFrom ( Box < Expr > , Box < Expr > ) ,
879- /// `<expr> IS [NOT] JSON [VALUE|SCALAR|ARRAY|OBJECT] [WITH|WITHOUT UNIQUE [KEYS]]`
880- IsJson {
881- /// Expression being tested.
882- expr : Box < Expr > ,
883- /// Optional JSON shape constraint.
884- kind : Option < JsonPredicateType > ,
885- /// Optional duplicate-key handling constraint for JSON objects.
886- unique_keys : Option < JsonKeyUniqueness > ,
887- /// `true` when `NOT` is present.
888- negated : bool ,
889- } ,
890879 /// `<expr> IS [ NOT ] [ form ] NORMALIZED`
891880 IsNormalized {
892881 /// Expression being tested.
@@ -1696,25 +1685,6 @@ impl fmt::Display for Expr {
16961685 Expr :: IsNotNull ( ast) => write ! ( f, "{ast} IS NOT NULL" ) ,
16971686 Expr :: IsUnknown ( ast) => write ! ( f, "{ast} IS UNKNOWN" ) ,
16981687 Expr :: IsNotUnknown ( ast) => write ! ( f, "{ast} IS NOT UNKNOWN" ) ,
1699- Expr :: IsJson {
1700- expr,
1701- kind,
1702- unique_keys,
1703- negated,
1704- } => {
1705- write ! ( f, "{expr} IS " ) ?;
1706- if * negated {
1707- write ! ( f, "NOT " ) ?;
1708- }
1709- write ! ( f, "JSON" ) ?;
1710- if let Some ( kind) = kind {
1711- write ! ( f, " {kind}" ) ?;
1712- }
1713- if let Some ( unique_keys) = unique_keys {
1714- write ! ( f, " {unique_keys}" ) ?;
1715- }
1716- Ok ( ( ) )
1717- }
17181688 Expr :: InList {
17191689 expr,
17201690 list,
@@ -8137,52 +8107,6 @@ pub enum AnalyzeFormat {
81378107 TREE ,
81388108}
81398109
8140- /// Optional type constraint for `IS JSON`.
8141- #[ derive( Debug , Clone , Copy , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
8142- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
8143- #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
8144- pub enum JsonPredicateType {
8145- /// `VALUE` form.
8146- Value ,
8147- /// `SCALAR` form.
8148- Scalar ,
8149- /// `ARRAY` form.
8150- Array ,
8151- /// `OBJECT` form.
8152- Object ,
8153- }
8154-
8155- impl fmt:: Display for JsonPredicateType {
8156- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
8157- match self {
8158- JsonPredicateType :: Value => write ! ( f, "VALUE" ) ,
8159- JsonPredicateType :: Scalar => write ! ( f, "SCALAR" ) ,
8160- JsonPredicateType :: Array => write ! ( f, "ARRAY" ) ,
8161- JsonPredicateType :: Object => write ! ( f, "OBJECT" ) ,
8162- }
8163- }
8164- }
8165-
8166- /// Optional duplicate-key handling for `IS JSON`.
8167- #[ derive( Debug , Clone , Copy , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
8168- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
8169- #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
8170- pub enum JsonKeyUniqueness {
8171- /// `WITH UNIQUE KEYS` form.
8172- WithUniqueKeys ,
8173- /// `WITHOUT UNIQUE KEYS` form.
8174- WithoutUniqueKeys ,
8175- }
8176-
8177- impl fmt:: Display for JsonKeyUniqueness {
8178- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
8179- match self {
8180- JsonKeyUniqueness :: WithUniqueKeys => write ! ( f, "WITH UNIQUE KEYS" ) ,
8181- JsonKeyUniqueness :: WithoutUniqueKeys => write ! ( f, "WITHOUT UNIQUE KEYS" ) ,
8182- }
8183- }
8184- }
8185-
81868110impl fmt:: Display for AnalyzeFormat {
81878111 fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
81888112 f. write_str ( match self {
0 commit comments