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!
9 files
+ 173
68
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 5
19
@@ -155,6 +155,11 @@ def build_metadata():
sa.Index('hive_posts_sc_trend_idx', 'sc_trend'),
sa.Index('hive_posts_sc_hot_idx', 'sc_hot'),
sa.Index('hive_posts_created_at_idx', 'created_at'),
sa.Index('hive_posts_root_author_id', 'root_author_id'),
sa.Index('hive_posts_root_permlink_id', 'root_permlink_id'),
sa.Index('hive_posts_parent_author_id', 'parent_author_id'),
sa.Index('hive_posts_parent_permlink_id', 'parent_permlink_id')
)
sa.Table(
@@ -567,25 +572,6 @@ def setup(db):
"""
db.query_no_return(sql)
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