Fix SUBSTRING from/to argument construction for mssql (#947)

This commit is contained in:
Jeremy Maness 2023-08-17 06:17:57 -04:00 committed by GitHub
parent 173a6db818
commit 8bbb85356c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 153 additions and 24 deletions

View file

@ -117,6 +117,10 @@ pub trait Dialect: Debug + Any {
fn supports_group_by_expr(&self) -> bool {
false
}
/// Returns true if the dialect supports `SUBSTRING(expr [FROM start] [FOR len])` expressions
fn supports_substring_from_for_expr(&self) -> bool {
true
}
/// Dialect-specific prefix parser override
fn parse_prefix(&self, _parser: &mut Parser) -> Option<Result<Expr, ParserError>> {
// return None to fall back to the default behavior