Expose deparseSync - #31
Closed
jgoux wants to merge 2 commits into
Closed
Conversation
|
Might be interesting to just expose all the protobuf stuff. It鈥檚 a bit more efficient than json in terms of size. |
Contributor
|
Opened #32 to address the protobuf issue by generating a protobuf message from the json parse tree, which gets sent over to the native library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello 馃憢,
I'm attempting to expose the
pg_query_deparse_protobuffunction.I tried to follow the existing code, but I don't have any experience with C++ or NAPI so I'm stuck on the
DeparseQuerySyncfunction insync.cc. 馃槄I understand that
pg_query_deparse_protobufis expecting the structPgQueryProtobufas its 1st argument, but I'm not sure how to declare and pass it.Right now it generates this error:
Any help is appreciated. 馃檹
EDIT:
In fact, it seems like
pg_query_deparse_protobufwill only be able to accept the result ofpg_query_parse_protobuf, so it won't work on the result ofpg_query_parseif I understand correctly. 馃We would need to add a
pg_query_deparseto libpg_query which would accept the result ofpg_query_parseand skip the protobuf layer. I opened an issue about it: pganalyze/libpg_query#178.I would love to have your feedback @pyramation on this matter, I saw you opened an issue about deparsing in libpg_query and you were interested in bringing it into this lib. 馃槃