supabase-community / postgres_lsp

A Language Server for Postgres
https://supabase.com
MIT License
3.24k stars 61 forks source link

feat: support `CreateEnumStmt` #67

Closed cvng closed 9 months ago

cvng commented 9 months ago

What kind of change does this PR introduce?

feat: support CreateEnumStmt

What is the current behavior?

Parser panics

What is the new behavior?

[2023-12-13T14:27:17Z DEBUG parser::codegen::tests] pg_query_root: Some(
        CreateEnumStmt(
            CreateEnumStmt {
                type_name: [
                    Node {
                        node: Some(
                            String(
                                String {
                                    sval: "status",
                                },
                            ),
                        ),
                    },
                ],
                vals: [
                    Node {
                        node: Some(
                            String(
                                String {
                                    sval: "open",
                                },
                            ),
                        ),
                    },
                    Node {
                        node: Some(
                            String(
                                String {
                                    sval: "closed",
                                },
                            ),
                        ),
                    },
                ],
            },
        ),
    )

Additional context

Add any other context or screenshots.