You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
4.2 KiB

################## SHOULD I SPLIT FOLLOW INTO 2 TABLES ?? ################################
we can put following and follower as 1 table instead of 2 table
(follower and following) but it's gonna be have multiple where clause when
querying instead, we can use less where clause query if we split it into two
tables, but idk how big is the performance difference is, so for right now
i'm just put it on single table, if the query speed diff noticeable we can
just remigrate it later
REF: - https://www.percona.com/blog/how-expensive-is-a-where-clause-in-mysql/
- https://stackoverflow.com/questions/58829268/does-using-where-clause-with-a-select-statement-increase-or-decrease-performance
##########################################################################################
######################### IMPLEMENT POLYMORPHIC RELATIONS ################################
ok idk how to implement polymorphic (without ORM ofc) because Rails have
the thing the polymorphic thing but imma just create a table with 1 column
"type" just polymorphic relation table so when i query it imma use "where"
clause.
ex: select message where commented_id = ... and where comment_type = (stories, ratings, locations)
##########################################################################################
####################### INDONESIA ADMINISTRATIVE DIVISION ################################
https://en.wikipedia.org/wiki/Provinces_of_Indonesia
##########################################################################################
######################### CUSTOM GIN VALIDATION ERR MESSAGE ##############################
make custom err message, and get all the type, the err message sucks now
https://github.com/gin-gonic/gin/issues/430 (using middleware)
tbh i'd raher use like a wrapper instead of middleware but we'll see
##########################################################################################
##########################################################################################
WITHOUT aUTHORIZATION ->
- AUTH
- GET LOCATIONS
- POST,PATCH,GET COMMENTS
- GET REVIEWS
- POST, REVIEWS ?
THE REST SHOUDL HAVE AUTHORIVAOZOIANITON
##########################################################################################
##########################################################################################
https://github.com/discourse/discourse
USE THIS FOR DISCSUSSSINON
##########################################################################################
##########################################################################################
OK FOR THE RATINGS IMMA USE THAT FLOW FIRST LIKE JOINING THE LOCAITONS AND REVIEWS
CALCULATE ALL THE RATINGS SHIT,
AFTER I FINISHED THE WHOLE THING IMMA TRY TO COMPARE IF EACH LOCATIONS HAVE user_ratings
user_counts etc etc
##########################################################################################
##########################################################################################
REWRITE COALESCE QUERY CAUSE IT'S SLOW
- https://stackoverflow.com/questions/6426436/postgresql-coalesce-performance-problem
- https://stackoverflow.com/questions/2287642/which-is-quicker-coalesce-or-isnull
##########################################################################################
##########################################################################################
USE THIS FOR NITFICOITON
https://docs.ntfy.sh/install/#docker
##########################################################################################
##########################################################################################
PAGINATION
http://andreyzavadskiy.com/2016/12/03/pagination-and-total-number-of-rows-from-one-select/
##########################################################################################
##########################################################################################
PAGINATION
http://andreyzavadskiy.com/2016/12/03/pagination-and-total-number-of-rows-from-one-select/
https://medium.easyread.co/how-to-do-pagination-in-postgres-with-golang-in-4-common-ways-12365b9fb528?gi=a4683590d1d2
##########################################################################################