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

fix(postgres): escape array literal values containing backslash #4797

Merged
merged 4 commits into from
Oct 7, 2023

Conversation

Strengthless
Copy link
Contributor

Fixes #4796.

@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
packages/postgresql/src/PostgreSqlPlatform.ts 99.21% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

tests/issues/GH4796.test.ts Show resolved Hide resolved
tests/issues/GH4796.test.ts Outdated Show resolved Hide resolved
@B4nan B4nan changed the title fix: postgresql driver exception when inserting array with single backslash fix(postgres): escape array literal values containing backslash Oct 7, 2023
@Strengthless
Copy link
Contributor Author

Strengthless commented Oct 7, 2023

Not sure whether the new title is more descriptive or misleading...

The issue seems to be some weird bug specific to single backslash, as both orm.em.create(User, { options: ['\\\\'] }) and orm.em.create(User, { options: ['\\test'] }) worked perfectly when I was trying to debug my code, if I remember correctly. Might want to double check though.

But I guess it doesn't really matter ¯\_(ツ)_/¯

@B4nan B4nan merged commit 20179ec into mikro-orm:master Oct 7, 2023
13 checks passed
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

Successfully merging this pull request may close these issues.

Malformed array literal when handling single backslash in an array
2 participants