oguimbal / pg-mem

An in memory postgres DB instance for your unit tests
MIT License
1.99k stars 97 forks source link

Unexpected quoted_word token when working with types #314

Closed mmmmmrob closed 1 year ago

mmmmmrob commented 1 year ago

Describe the bug

Mixed case names for types causes the parser to fail with Unexpected quoted_word token

Unexpected quoted_word token: "State". I did not expect any more input. Here is the state of my parse table:

        kw_index → %word ● 
        kw_sequence → %word ●

To Reproduce

CREATE TYPE "State" AS ENUM(
    'PENDING',
    'DECLINED',
    'IN_PROGRESS',
    'COMPLETED'
);

pg-mem version

"version": "2.6.12"

(nb: the version in your package.json version is often not precise enough... please run "cat ./node_modules/pg-mem/package.json | grep version" to tell which minor version is actually installed)

mmmmmrob commented 1 year ago

This fails when using db.public.none(sql) but works when using db.public.query(sql) so I'm assuming it's my error.