Create a new [`Ident`] _without checking any of our invariants_. NOTE: Generally you __should not use this function__! If you're trying to create an [`Ident`] from a `&'static str` you know is valid, use the [`ident!`] macro. For all other use cases, see [`Ident::new`] which correctly checks our invariants. [`ident!`]: [`mz_sql_parser::ident`]
(value: S)
| 128 | /// |
| 129 | /// [`ident!`]: [`mz_sql_parser::ident`] |
| 130 | pub fn new_unchecked<S: Into<String>>(value: S) -> Self { |
| 131 | let s = value.into(); |
| 132 | mz_ore::soft_assert_no_log!(s.len() <= Self::MAX_LENGTH); |
| 133 | |
| 134 | Ident(s) |
| 135 | } |
| 136 | |
| 137 | /// Generate a valid [`Ident`] with the provided `prefix` and `suffix`. |
| 138 | /// |