pg_fake_sqlparser_derive
Procedural macros for the pg_fake_sqlparser fork maintained for pg_fake.
This package derives from Apache DataFusion sqlparser-rs
and is not an official Apache release. Its Rust library name remains
sqlparser_derive.
It provides Visit and VisitMut derives for AST traversal and
derive_dialect! for custom SQL dialects.
Recommended use
Enable the corresponding features on the parser crate. It selects the paired derive version automatically:
[]
= { = "pg_fake_sqlparser", = "0.63.0", = ["visitor", "derive-dialect"] }
use derive_dialect;
use ;
derive_dialect!;
Direct dependency and version pairing
If you need a direct dependency on the procedural macros, use both aliases:
[]
= { = "pg_fake_sqlparser", = "=0.63.0", = ["visitor"] }
= { = "pg_fake_sqlparser_derive", = "=0.6.0" }
Keep the sqlparser dependency key because generated code refers to that
name. Derive version 0.6.0 is paired with parser version 0.63.0.
Do not substitute the upstream sqlparser or sqlparser_derive packages.
For derive_dialect!, the shipped parser-version file identifies the
parser source version. The macro reads src/dialect/mod.rs from the parser
repository above derive/, or from the sibling Cargo registry directory
pg_fake_sqlparser-0.63.0. It reports an error when that source is missing,
instead of selecting another cached parser version. Unversioned vendor
layouts are not supported.
Links and license
Licensed under Apache-2.0. Upstream attribution is retained in
NOTICE.TXT and the source files. This fork includes modifications
for pg_fake; upstream authorship is preserved.