Skip to content
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

Merged
merged 8 commits into from Jun 2, 2017
Merged

Improve json return #158

merged 8 commits into from Jun 2, 2017

Conversation

crgimenes
Copy link
Contributor

@crgimenes crgimenes commented Jun 2, 2017

Referring to issue #157

@crgimenes crgimenes changed the title [WIP] Improve json return Improve json return Jun 2, 2017
@codecov
Copy link

codecov bot commented Jun 2, 2017

Codecov Report

Merging #158 into master will increase coverage by 0.35%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
adapters/postgres/postgres.go 83.04% <100%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9f7abe...3bed321. Read the comment docs.

Copy link
Member

@felipeweb felipeweb left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@marioidival marioidival merged commit 4012cff into master Jun 2, 2017
@marioidival marioidival deleted the improve-json-return branch June 2, 2017 19:38
avelino added a commit that referenced this pull request Jun 6, 2017
* '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)
avelino pushed a commit that referenced this pull request Jul 16, 2020
* 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
avelino pushed a commit that referenced this pull request Jul 16, 2020
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants