apache / apache/datafusion-sqlparser-rs
ast: provider builders for convenient programmatic construction
- Vorherrschende Sprache
- Rust
- Sterne
- 3.5k
- Forks
- 772
- Ø Merge
- 4 T. 9 Std.
- Gemergte PRs (30 T.)
- 17
Beschreibung
I have a use case where I'm generating SQL strings, and in general having `sqlparser::ast` is quite good, but the structs are particularly painful to construct programatically. It'd be interesting if the ast structs offered an optional feature that had https://github.com/elastio/bon builders derived to build them.
Maybe somebody will teach me how to safely construct strings that I can then parse (that'd be fine! I just am not generally eager to be doing string formatting to produce sql, particularly given I don't have full control over the identifiers). For now I am generally just doing this formatting, but I don't love it.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Das Issue nennt sqlparser::ast und ein optionales, von bon abgeleitetes Builder-Feature als Einstiegspunkte; untersuche, wie AST-Strukturen und optionale Features derzeit definiert sind. Das Ergebnis sollte ein abgestimmter, nutzbarer Builder-Ansatz für die relevanten AST-Strukturen sein, der den Bedarf reduziert, SQL-Strings manuell zu formatieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust, sql
- Bereich
- backend-api-design, databases
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100