Comments (9)
@smilliken I'd like to see PostgreSQL schema to capnproto and protobuf conversion in general, even if it's in an external package. @begriffs maybe once logical decoding and streaming are a thing this could be used for that depending on whatever haskell supports best.
from postgrest.
Perhaps send raml if client requests application/raml+yaml
from postgrest.
There's a lot of fragmentation for schema description and serialization formats, and everyone's going to have a different favorite. I'd recommend designing this feature so it's easy to support other formats. Here's a few others:
https://capnproto.org/
https://github.com/google/protobuf/
https://thrift.apache.org/
https://github.com/Microsoft/bond
http://msgpack.org/
from postgrest.
I'm very interested in this feature, and considering forking to implement it.
Has there been any progress, is anyone planning to or in the middle of working on it?
from postgrest.
Go right ahead, I'd love your help!
from postgrest.
@affogato @begriffs I'm considering starting some work on this feature. I agree (as mentioned above) that we should be able to change the output format. This should not be hard as src/PostgREST/PgStructure.hs
already works with intermediary data types. Here's how I'm planning to implement:
- Move
TableOptions
data type fromApp
toPgStructure
since it deals with intermediary data types. - Create a
StructureConverters
(name suggestions are welcome) and move the currentToJSON
instances in there. Use this module for all output converters. - Create a second encoder (possibly RAML).
- Create a function that choses the encoder based on Accept headers (similar to
contentTypeForAccept
).
Ideas? Feedbacks? If anyone is willing to discuss in finer details on gitter that would be great :D
from postgrest.
@diogob That would be great. I don't know Haskell, so it was a bit ambitious. If I do get to it, I'd be using a script to convert from the current response to RAML or YAML.
from postgrest.
@affogato if you implement any conversion script in this fashion please let us know here, it would be useful to implement the feature ;)
from postgrest.
Issue #144 is technically a duplicate of this one but that other issue has more recent momentum, so I'm closing this one. Let's move discussion over to 144.
from postgrest.
Related Issues (20)
- Rejected `application/vnd.pgrst.object+json` returns the media type sucessfully
- Fields operations on select HOT 1
- Content-type not set when function returning a domain representing media type is requested with Accept "*/*" header HOT 2
- Response body encoded as JSON string when function returning a domain representing media type is requested with Accept "*/*" header HOT 1
- Improve string handling in Query generation for additional safety and performance HOT 1
- Misleading error PGRST121 HOT 2
- Document the need to use double embedding when doing OR filtering across embeds
- On-demand server-timing HOT 3
- Event triggers don't work on read replicas HOT 6
- Add the error code in the logs HOT 3
- OpenAPI does not tag a column as FK if it also has a UNIQUE constraint
- IO tests depend too heavily on timing / sleeping HOT 9
- Conditional Puts/Upserts HOT 1
- Error PGRST200 on a view
- arm builds failing in CI HOT 4
- Cannot nix run PostgREST on aarch64-darwin HOT 1
- Add pool checkout to `Server-Timing` HOT 1
- POST header Prefer: return=headers-only not returning LOCATION information HOT 2
- `600 Operator Error` status code
- The Case of count() : doc not ok HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgrest.