Closed caldwell closed 1 month ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/dialect/postgresql.rs | 18 | 19 | 94.74% | ||
tests/sqlparser_postgres.rs | 15 | 16 | 93.75% | ||
<!-- | Total: | 34 | 36 | 94.44% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/ast/ddl.rs | 1 | 87.46% | ||
tests/sqlparser_postgres.rs | 1 | 88.57% | ||
<!-- | Total: | 2 | --> |
Totals | |
---|---|
Change from base Build 11429400839: | 0.005% |
Covered Lines: | 30497 |
Relevant Lines: | 34116 |
@caldwell have you had a chance to consider @iffyio 's suggestions above?
Apologies, not yet. I'll try to look at it today.
I amended my commit per @iffyio's suggestions. Thanks for taking the time to look at it and apologies again for taking too long to respond.
I amended my commit per @iffyio's suggestions. Thanks for taking the time to look at it and apologies again for taking too long to respond.
no worries -- thank you!
I pushed a fix for the formatting test failure.
🚀
See: https://www.postgresql.org/docs/current/sql-createtype.html
I implemented this as a separate
Statement::CreateTypeAsEnum { name, labels }
so it wouldn't be as invasive to the existingStatement::CreateType
(which I would imagine helps forwards/backwards compatibility for the crate's users).I used the
PostgreSqlDialect
's comment as a blueprint but that means that the generic dialect doesn't get this feature (unless I'm missing something). I didn't seeparse_statement()
implemented inGenericDialect
though I suppose it could be (and call out to other dialects'parse_statement()
s). I didn't want to set that precedent without asking.