-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: postgres jsonpath column type #10457
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
Conversation
|
looks like tests are failing |
| }, | ||
| ] | ||
| document.date = new Date() | ||
| document.path = "$.weight" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need it here
|
|
||
| @Column({ type: "jsonpath" }) | ||
| path: string | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need it here
| post.uuid = "0e37df36-f698-11e6-8dd4-cb9ced3df976" | ||
| post.json = { id: 1, name: "Post" } | ||
| post.jsonb = { id: 1, name: "Post" } | ||
| post.jsonpath = "$.name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a test checks below like we did for another column types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added assertions for jsonpath
|
@pleerock the oracle test failed due to a timeout, could you please rerun it? |
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your help @nialexsan
is this PR still valid? can you fix the test and align the PR with the master branch please?
| import { expect } from "chai" | ||
| import { Example } from "./entity/example" | ||
|
|
||
| // values from https://github.com/obartunov/sqljsondoc/blob/master/jsonpath.md#jsonpath-in-postgresql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather add link to the postgres documentation here, and only mention source for the current values in the comment for PR.
Valid links would be:
| beforeEach(() => reloadTestingDatabases(connections)) | ||
| after(() => closeTestingConnections(connections)) | ||
|
|
||
| it("should insert and retrieve jsonpath values as strings", () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all those tests should be implemented in test/functional/database-schema/column-types/postgres/column-types-postgres.ts. This is not a bug we are dealing with here, rather new feature. It would be super hard to find those tests later when the burried in issue-10456.ts
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is stale, I'm going to close it in favour of #11684
Description of change
Fixes #10456
Adds
jsonpathcolumn type for PostgresPull-Request Checklist
masterbranchnpm run formatto apply prettier formattingnpm run testpasses with this changeFixes #0000