Skip to content

Enhance query capabilities when using Postgres #2877

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

Closed
kulshekhar opened this issue Oct 17, 2016 · 15 comments
Closed

Enhance query capabilities when using Postgres #2877

kulshekhar opened this issue Oct 17, 2016 · 15 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@kulshekhar
Copy link
Contributor

Postgres allows additional types of queries that aren't currently exposed by the database adapter (for example - getting distinct values, executing a transaction, setting a per transaction consistency level and a whole lot more)

It would be great if Parse Server can allow users to execute queries such as these when used with Postgres.

@kulshekhar
Copy link
Contributor Author

I'm willing to start working on this but I'm not that well acquainted with the entire codebase.

If someone can provide pointers on where to start, what gotchas to be aware of and how not to break the Mongo side of things, it would be very helpful

@flovilmart
Copy link
Contributor

I'm not sure we want to focus on having different interfaces depending on the storage engine. Transactions would be nice to ensure consistency during the writes, the distinct value would also work in mongo db through an aggregation.

@kulshekhar
Copy link
Contributor Author

Is it currently possible to extend the routes handled by parse server in a manner that would allow the new handlers to use the existing mechanism for authenticating and sanitizing requests?

@flovilmart
Copy link
Contributor

That would require to add some 'feature support' mechanisms into the adapters, in order to abstract the support in both adapters.

Before going to far ahead with Postgres, I believe we should also solidify the existant code. Some tests are failing in the CI, others are disabled etc...

@kulshekhar
Copy link
Contributor Author

In that case, if someone can guide me in implementing one test case, I would hopefully be able to help bring the existing Postgres related code base up to scratch.

@lsxredrain
Copy link

name: 'error',
length: 108,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '33',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3090',
routine: 'errorMissingColumn' } error: column "password" does not exist
at Connection.parseE (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js: 539:11)
at Connection.parseMessage (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connecti on.js:366:17)
at Socket. (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js :105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:543:20)
error: column "password" does not exist
at Connection.parseE (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js: 539:11)
at Connection.parseMessage (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connecti on.js:366:17)
at Socket. (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js :105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:543:20)

@kulshekhar
Copy link
Contributor Author

kulshekhar commented Oct 30, 2016

With the recent improvement in Postgres support, is it a good time to start a discussion on whether/how to extend parse server to fully utilize the capabilities of Postgres?

@flovilmart
Copy link
Contributor

There is still 30 tests that are excluded with PG (6 are also excluded with mongo), maybe we can focus on drilling those down before expanding query capabilities?

@kulshekhar
Copy link
Contributor Author

Sure. Are all of these contained in describe_only_db blocks?

@flovilmart
Copy link
Contributor

and also it_excludes_db

@kulshekhar
Copy link
Contributor Author

got it. thanks!

@flovilmart
Copy link
Contributor

Some won't probably fix, but others could very well fix 'easily'

@flovilmart
Copy link
Contributor

One easy trick ton only run those, is to return fit in it_excludes_db the describe_only_db is supposedly to run tests that we know won't pass on purpose (and therefore don'T need a fix)

@kulshekhar
Copy link
Contributor Author

Thanks for the tip :)

@stale
Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 18, 2018
@stale stale bot closed this as completed Sep 25, 2018
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

4 participants