|
| 1 | +//! Constants shared by the engine modules, and the placeholders hosts write for template code. |
| 2 | +
|
| 3 | +pub(crate) const SQL_WILDCARD: &str = "*"; |
| 4 | +pub(crate) const OPEN_PAREN: &str = "("; |
| 5 | +pub(crate) const CLOSE_PAREN: &str = ")"; |
| 6 | +pub(crate) const EMPTY_FIXTURE_QUERY_TOKEN_COUNT: usize = 6; |
| 7 | +pub(crate) const ENCLOSING_CTE_TOKEN_COUNT: usize = 3; |
| 8 | +/// The indent of each line of a configuration snippet printed in remediation text. |
| 9 | +pub(crate) const SETTING_SNIPPET_INDENT: &str = " "; |
| 10 | +/// The configuration file remediation text names when the request does not name one. |
| 11 | +pub const DEFAULT_CONFIG_FILE: &str = "sqlclean.toml"; |
| 12 | +/// The identifier prefix a host writes in place of each template interpolation. |
| 13 | +pub const INTERPOLATION_PLACEHOLDER_PREFIX: &str = "__sqlclean_interpolation_"; |
| 14 | +/// The identifier prefix a host writes in place of a SQL macro parameter. |
| 15 | +pub const MACRO_PARAMETER_PLACEHOLDER_PREFIX: &str = "__sqlclean_macro_parameter_"; |
| 16 | +/// The prefix of a relation parameter placeholder, written `<prefix><index>__`. |
| 17 | +pub const RELATION_PARAMETER_PLACEHOLDER_PREFIX: &str = "__sqlclean_relation_parameter_"; |
| 18 | +/// The identifier prefix a host writes in place of a value parameter. |
| 19 | +pub const VALUE_PARAMETER_PLACEHOLDER_PREFIX: &str = "__sqlclean_value_parameter_"; |
| 20 | +/// Placeholders standing for names the host generates, which Rules never judge as authored names. |
| 21 | +pub(crate) const GENERATED_PLACEHOLDER_PREFIXES: [&str; 3] = [ |
| 22 | + INTERPOLATION_PLACEHOLDER_PREFIX, |
| 23 | + RELATION_PARAMETER_PLACEHOLDER_PREFIX, |
| 24 | + VALUE_PARAMETER_PLACEHOLDER_PREFIX, |
| 25 | +]; |
0 commit comments