Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not support postgres multi line comment with special characters #438

Open
sdoshibitgo opened this issue Jan 10, 2025 · 0 comments
Open

Comments

@sdoshibitgo
Copy link

Describe the bug

Trying this with typeorm

const cmment = JSON.stringify({"requestId":"test-request-id"}) await PGLiteDataSource.query(CREATE TABLE IF NOT EXISTS todo (
id SERIAL PRIMARY KEY,
task TEXT,
done BOOLEAN DEFAULT false
) /* RequestId ${cmment} RequestId */);

QueryFailedError: invalid syntax at line 5 col 28:

3          task TEXT,
4          done BOOLEAN DEFAULT false
5              ) /* RequestId {"requestId":"test-request-id"} RequestId */;
                              ^
Unexpected input (lexer error). Instead, I was expecting to see one of the following:

    - A "kw_primary" token
    - A "kw_unique" token
    - A "quoted_word" token
    - A "word" token
    - A "semicolon" token

To Reproduce

"If possible, paste here (including create table statements) a query that fails on https://oguimbal.github.io/pg-mem-playground/, but suceeds when ran on an actual PG database"

pg-mem version

(paste your pg-mem version here)

(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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant