-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Improve json return #158
Improve json return #158
Conversation
Codecov Report
@@ Coverage Diff @@
## master #158 +/- ##
==========================================
+ Coverage 85.32% 85.68% +0.35%
==========================================
Files 11 11
Lines 879 852 -27
==========================================
- Hits 750 730 -20
+ Misses 85 82 -3
+ Partials 44 40 -4
Continue to review full report at Codecov.
|
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.
LGTM
@@ -263,50 +263,15 @@ func Query(SQL string, params ...interface{}) (jsonData []byte, err error) { | |||
return | |||
} | |||
|
|||
SQL = fmt.Sprintf("SELECT json_agg(s) FROM (%s) s", SQL) |
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.
🥇
* 'master' of github.com:nuveo/prest: Change key with respect to JWT token (#164) Correct readme example Minor refactor (#160) Add array support (#156) Improve json return (#158) remove mock prevent more than load when use pREST as a module (#155) a mock of database connection (#154) implement funcs to help scripts (#152) fix bug in insert json (#150) introduce debug mode (#148)
* Use json_agg instead of assembling the answer and then return the json via Go * remove redundant string * remove ";" from requests * remove statement_timeout test * remove TestMockUsage * update TestGetSchemas * go fmt
* Use json_agg instead of assembling the answer and then return the json via Go * remove redundant string * remove ";" from requests * remove statement_timeout test * remove TestMockUsage * update TestGetSchemas * go fmt
Referring to issue #157