Open Afulton11 opened 5 years ago
Okay, I believe I've written procedures for the bulk of what we need (add, update/delete, search) and organized the procedures in the file (so it's easier to browse). If you could, would you take a look at what's there and let me know what else needs to be added?
@fenrirmitsuki
I noticed you have 2 have the same procedures for followers: Blog.GetFollowers
and your Blog.DisplayArticle
query has a GROUP BY clause, but then nothing within it.
Also, you could create a new branch named something like dev-joe
or feat-sql-procedures
and push to that branch instead. Then, you could create a pull request using Github to merge your branch into dev
branch. This way, I could leave a review on it before you commit and make any small changes myself, or point out directly in the code what needs to be fixed before it is pushed to our developer branch.
We still need the following procedures that I could think of:
Something else I noticed too is that on many of your GET procedures you are not checking to see if the entity has already been soft deleted. For example in Blog.GetComments
the where clause should be something like
WHERE Com.ArticleID = @ArticleID AND (Com.DeletedAt IS NULL OR Com.DeletedAt > SYSDATETIME())
instead of
WHERE Com.ArticleID = @ArticleID
EDIT: Sorry, comments are the 1 thing that should still exist in the return result even if it is deleted. However, almost everything else needs to be checked of is deleted.
Blog.AddNewArticle
you are currently requiring the CreationDateTime and LastUpdateTime to be passed in to it. These values are inserted automatically into our tables because we have those default values set. These can be removed.
This issue contains a feature list needed for each "page" in the website (updated often)
Key
/
/signin
/signup
/user/{username}
Provided the user exists and is NOT deleted...
User on their own profile
/article/{title}
Update Sql database article constraint Title should be unique for all articles
display article title
display article creation date
display article last updated date
display article author
display # favorites
display if current user has favorited
display article category
display article body
?? Show a small "About the author" section
Link to previous post (author's previous post by creation date)
Link to next post (author's next post by creation date)
Display comments on this article (with pagination)
/category/{category}
/hiscores
?? This entire page may not be added