single_quoted_string updated to accept various string types

Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
This commit is contained in:
Sergey Olontsev 2025-06-24 07:43:56 +01:00 committed by GitHub
parent 2575081556
commit f693735167
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -366,9 +366,9 @@ pub fn number(n: &str) -> Value {
Value::Number(n.parse().unwrap(), false)
}
/// Creates a `Value::SingleQuotedString`
pub fn single_quoted_string(s: &str) -> Value {
Value::SingleQuotedString(s.to_string())
/// Creates a [Value::SingleQuotedString]
pub fn single_quoted_string(s: impl Into<String>) -> Value {
Value::SingleQuotedString(s.into())
}
pub fn table_alias(name: impl Into<String>) -> Option<TableAlias> {