mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
This change introduces a lifetime parameter 'a to BorrowedToken enum
to prepare for zero-copy tokenization support. This is a foundational
step toward reducing memory allocations during SQL parsing.
Changes:
- Added lifetime parameter to BorrowedToken<'a> enum
- Added _Phantom(Cow<'a, str>) variant to carry the lifetime
- Implemented Visit and VisitMut traits for Cow<'a, str> to support
the visitor pattern with the new lifetime parameter
- Fixed lifetime issues in visitor tests by using tokenized_owned()
instead of tokenize() where owned tokens are required
- Type alias Token = BorrowedToken<'static> maintains backward
compatibility
|
||
|---|---|---|
| .. | ||
| queries/tpch | ||
| test_utils | ||
| pretty_print.rs | ||
| sqlparser_bigquery.rs | ||
| sqlparser_clickhouse.rs | ||
| sqlparser_common.rs | ||
| sqlparser_custom_dialect.rs | ||
| sqlparser_databricks.rs | ||
| sqlparser_duckdb.rs | ||
| sqlparser_hive.rs | ||
| sqlparser_mssql.rs | ||
| sqlparser_mysql.rs | ||
| sqlparser_postgres.rs | ||
| sqlparser_redshift.rs | ||
| sqlparser_regression.rs | ||
| sqlparser_snowflake.rs | ||
| sqlparser_sqlite.rs | ||