Skip to content
Snippets Groups Projects

list_comments api call improvements

Merged Dariusz Kędzierski requested to merge dk-list-comments-by-fixes into develop
All threads resolved!
8 files
+ 16
36
Compare changes
  • Side-by-side
  • Inline
Files
8
  • 2fba430f
    SQL fixes · 2fba430f
    Dariusz Kędzierski authored
    - do not query muted and deleted posts,
    - removed materialized vierw from schema (it was no used
      besides in order for it to work one should schedule
      view refres which can be expensive)
    - fixes in queries
+ 0
22
@@ -571,28 +571,6 @@ def setup(db):
"""
db.query_no_return(sql)
# consider removing this view as it needs to be refreshed on insert/deleter/update op
# on hive_posts table
# its not used at the moment, tests pending
sql = """
DROP MATERIALIZED VIEW IF EXISTS hive_posts_a_p
;
CREATE MATERIALIZED VIEW hive_posts_a_p
AS
SELECT hp.id AS id,
ha_a.name AS author,
hpd_p.permlink AS permlink
FROM hive_posts hp
INNER JOIN hive_accounts ha_a ON ha_a.id = hp.author_id
INNER JOIN hive_permlink_data hpd_p ON hpd_p.id = hp.permlink_id
WITH DATA
;
DROP INDEX IF EXISTS hive_posts_a_p_idx
;
CREATE unique index hive_posts_a_p_idx ON hive_posts_a_p (author collate "C", permlink collate "C")
"""
db.query_no_return(sql)
sql = """
DROP VIEW IF EXISTS public.hive_posts_view;
Loading