Post Service Queries: Make Improvements Similar to Those made with User Service Queries #92
Open
1 of 6 tasks
Labels
Projects
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 insteaddb.Exec()
similar to what was used inupsertRole()
method in theqryuser.go
.When finding posts, the items returned should be limited. Include
limit
andlapse
in theselect
query for finding posts, similar to how user posts are found.A/C
upsertType()
db.Prepare()
.y.Name
tox.Name
, should query the database for the value ofy.Name
upsertPost()
y
with the fields fromx
, query the database for the needed informationdb.Prepare()
.qryuser.go
inupsertUser()
in PR Link roles to users in user service #86findPosts()
The text was updated successfully, but these errors were encountered: