mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-11 22:42:02 +00:00
Expand handling of LIMIT 1, 2
handling to include sqlite (#1447)
This commit is contained in:
parent
ce2686a169
commit
1e0460a7df
8 changed files with 61 additions and 24 deletions
|
@ -67,7 +67,7 @@ use alloc::boxed::Box;
|
|||
/// 1. user defined [`Dialect`]s can customize the parsing behavior
|
||||
/// 2. The differences between dialects can be clearly documented in the trait
|
||||
///
|
||||
/// `dialect_of!(parser Is SQLiteDialect | GenericDialect)` evaluates
|
||||
/// `dialect_of!(parser is SQLiteDialect | GenericDialect)` evaluates
|
||||
/// to `true` if `parser.dialect` is one of the [`Dialect`]s specified.
|
||||
macro_rules! dialect_of {
|
||||
( $parsed_dialect: ident is $($dialect_type: ty)|+ ) => {
|
||||
|
@ -323,6 +323,11 @@ pub trait Dialect: Debug + Any {
|
|||
false
|
||||
}
|
||||
|
||||
/// Does the dialect support parsing `LIMIT 1, 2` as `LIMIT 2 OFFSET 1`?
|
||||
fn supports_limit_comma(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Does the dialect support trailing commas in the projection list?
|
||||
fn supports_projection_trailing_commas(&self) -> bool {
|
||||
self.supports_trailing_commas()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue