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

Post Service Queries: Make Improvements Similar to Those made with User Service Queries #92

Open
1 of 6 tasks
codegold79 opened this issue Aug 6, 2020 · 0 comments
Open
1 of 6 tasks
Labels
end: back note: good first good first issue to consider taking

Comments

@codegold79
Copy link
Collaborator

codegold79 commented Aug 6, 2020

The post service returns responses (y) whose values are copied from the request (x). Instead of copying, the response values should come from another database query. Add those queries.

The upsert queries in post are also using db.Prepare() when it is not necessary. See http://go-database-sql.org/prepared.html for more information. Use instead db.Exec() similar to what was used in upsertRole() method in the qryuser.go.

When finding posts, the items returned should be limited. Include limit and lapse in the select query for finding posts, similar to how user posts are found.

A/C

  • blocked by back: Remove explicit db.Prepare usage in User Service #85
  • method upsertType()
    • doesn't need a query prepared with db.Prepare().
    • instead of setting y.Name to x.Name, should query the database for the value of y.Name
  • method upsertPost()
    • instead of setting the fields in y with the fields from x, query the database for the needed information
    • doesn't need a query prepared with db.Prepare().
  • can follow what was done for qryuser.go in upsertUser() in PR Link roles to users in user service #86
  • method findPosts()
    • include limit and lapse in the select query, similar to how it is done for finding users.
@codegold79 codegold79 added note: good first good first issue to consider taking end: back labels Aug 6, 2020
@daved daved added this to the MVP: Prototype Post Service milestone Oct 22, 2020
@daved daved added this to Proposed in Issue Qualification via automation Oct 22, 2020
@daved daved moved this from Proposed to Accepted in Issue Qualification Oct 22, 2020
@coatsd coatsd self-assigned this Dec 3, 2020
@daved daved moved this from Accepted to Claimed in Issue Qualification Dec 3, 2020
@daved daved removed this from the MVP: Prototype Post Service milestone Jan 20, 2021
@daved daved unassigned coatsd Jun 3, 2021
@daved daved moved this from Claimed to Proposed in Issue Qualification Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
end: back note: good first good first issue to consider taking
Projects
Issue Qualification
  
Proposed
Development

No branches or pull requests

3 participants