pub async fn fetch_root_headline_related_paragraph(
conn: &mut SqliteConnection,
headline_per_page: u8,
headline_page: u32,
) -> Result<IndexMap<i64, IndexMap<i64, Item>>, Error>Expand description
親が存在しない見出しとそれらに紐づいた段落を取得します。
SELECT *
FROM view_deserializable_item
WHERE item_type = 'paragraph'
AND p_headline_id IN (SELECT id
FROM headlines
WHERE parent_id IS NULL
ORDER BY headline_pos NULLS LAST
LIMIT ? OFFSET ?)
ORDER BY p_paragraph_pos NULLS LAST;