sq3_parser/keyword/
exclude.rs1use std::{any::Any, fmt::Display};
2
3use crate::traits::SqliteKeyword;
4
5#[derive(Debug, PartialEq, Eq)]
6pub(crate) struct Exclude;
7impl Exclude {
8 pub const fn as_str() -> &'static str {
9 "EXCLUDE"
10 }
11}
12
13impl PartialEq<&str> for Exclude {
14 fn eq(&self, other: &&str) -> bool {
15 Exclude::as_str().eq_ignore_ascii_case(other)
16 }
17}
18
19impl PartialEq<Exclude> for &str {
20 fn eq(&self, _: &Exclude) -> bool {
21 Exclude::as_str().eq_ignore_ascii_case(self)
22 }
23}
24
25impl Display for Exclude {
26 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27 write!(f, "{}", Self::as_str())
28 }
29}
30
31impl SqliteKeyword for Exclude {
32 fn as_any(&self) -> &dyn Any {
33 self
34 }
35 fn to_any(self) -> Box<dyn Any> {
36 Box::new(self)
37 }
38}