pganalyze / pg_query.rs

Rust library to parse, deparse and normalize SQL queries using the PostgreSQL query parser
MIT License
126 stars 12 forks source link

rust-analyzer cannot figure out the type of Node #10

Open rex-remind101 opened 2 years ago

rex-remind101 commented 2 years ago

This is likely more a problem with rust-analyzer than this library, but I want to raise awareness because this harms ergonomics and I'd like to understand if there's a work around you all have figured out.

e.g. Even though type is Result<Vec<Node::SelectStmt, Error>> and this code compiles correctly, rust-analyzer provides Result<Vec<{unknown}, Error>>

Screen Shot 2022-07-15 at 9 42 44 AM

Anything that can be done to make this easier to work with?