fix
This commit is contained in:
parent
6a39d89ef9
commit
4b1ac9177d
2 changed files with 18 additions and 6 deletions
|
|
@ -78,7 +78,10 @@ SELECT
|
||||||
t.*,
|
t.*,
|
||||||
i.storage_type::text as title_storage_type,
|
i.storage_type::text as title_storage_type,
|
||||||
i.image_path as title_image_path,
|
i.image_path as title_image_path,
|
||||||
jsonb_agg(g.tag_name)'[]'::jsonb as tag_names,
|
COALESCE(
|
||||||
|
jsonb_agg(g.tag_names) FILTER (WHERE g.tag_names IS NOT NULL),
|
||||||
|
'[]'::jsonb
|
||||||
|
) as tag_names,
|
||||||
s.studio_name as studio_name,
|
s.studio_name as studio_name,
|
||||||
s.illust_id as studio_illust_id,
|
s.illust_id as studio_illust_id,
|
||||||
s.studio_desc as studio_desc,
|
s.studio_desc as studio_desc,
|
||||||
|
|
@ -101,7 +104,10 @@ SELECT
|
||||||
t.*,
|
t.*,
|
||||||
i.storage_type::text as title_storage_type,
|
i.storage_type::text as title_storage_type,
|
||||||
i.image_path as title_image_path,
|
i.image_path as title_image_path,
|
||||||
jsonb_agg(g.tag_name)'[]'::jsonb as tag_names,
|
COALESCE(
|
||||||
|
jsonb_agg(g.tag_names) FILTER (WHERE g.tag_names IS NOT NULL),
|
||||||
|
'[]'::jsonb
|
||||||
|
) as tag_names,
|
||||||
s.studio_name as studio_name,
|
s.studio_name as studio_name,
|
||||||
s.illust_id as studio_illust_id,
|
s.illust_id as studio_illust_id,
|
||||||
s.studio_desc as studio_desc,
|
s.studio_desc as studio_desc,
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,10 @@ SELECT
|
||||||
t.id, t.title_names, t.studio_id, t.poster_id, t.title_status, t.rating, t.rating_count, t.release_year, t.release_season, t.season, t.episodes_aired, t.episodes_all, t.episodes_len,
|
t.id, t.title_names, t.studio_id, t.poster_id, t.title_status, t.rating, t.rating_count, t.release_year, t.release_season, t.season, t.episodes_aired, t.episodes_all, t.episodes_len,
|
||||||
i.storage_type::text as title_storage_type,
|
i.storage_type::text as title_storage_type,
|
||||||
i.image_path as title_image_path,
|
i.image_path as title_image_path,
|
||||||
jsonb_agg(g.tag_name)'[]'::jsonb as tag_names,
|
COALESCE(
|
||||||
|
jsonb_agg(g.tag_names) FILTER (WHERE g.tag_names IS NOT NULL),
|
||||||
|
'[]'::jsonb
|
||||||
|
) as tag_names,
|
||||||
s.studio_name as studio_name,
|
s.studio_name as studio_name,
|
||||||
s.illust_id as studio_illust_id,
|
s.illust_id as studio_illust_id,
|
||||||
s.studio_desc as studio_desc,
|
s.studio_desc as studio_desc,
|
||||||
|
|
@ -155,7 +158,7 @@ type GetTitleByIDRow struct {
|
||||||
EpisodesLen []byte `json:"episodes_len"`
|
EpisodesLen []byte `json:"episodes_len"`
|
||||||
TitleStorageType string `json:"title_storage_type"`
|
TitleStorageType string `json:"title_storage_type"`
|
||||||
TitleImagePath *string `json:"title_image_path"`
|
TitleImagePath *string `json:"title_image_path"`
|
||||||
TagNames []byte `json:"tag_names"`
|
TagNames interface{} `json:"tag_names"`
|
||||||
StudioName *string `json:"studio_name"`
|
StudioName *string `json:"studio_name"`
|
||||||
StudioIllustID *int64 `json:"studio_illust_id"`
|
StudioIllustID *int64 `json:"studio_illust_id"`
|
||||||
StudioDesc *string `json:"studio_desc"`
|
StudioDesc *string `json:"studio_desc"`
|
||||||
|
|
@ -341,7 +344,10 @@ SELECT
|
||||||
t.id, t.title_names, t.studio_id, t.poster_id, t.title_status, t.rating, t.rating_count, t.release_year, t.release_season, t.season, t.episodes_aired, t.episodes_all, t.episodes_len,
|
t.id, t.title_names, t.studio_id, t.poster_id, t.title_status, t.rating, t.rating_count, t.release_year, t.release_season, t.season, t.episodes_aired, t.episodes_all, t.episodes_len,
|
||||||
i.storage_type::text as title_storage_type,
|
i.storage_type::text as title_storage_type,
|
||||||
i.image_path as title_image_path,
|
i.image_path as title_image_path,
|
||||||
jsonb_agg(g.tag_name)'[]'::jsonb as tag_names,
|
COALESCE(
|
||||||
|
jsonb_agg(g.tag_names) FILTER (WHERE g.tag_names IS NOT NULL),
|
||||||
|
'[]'::jsonb
|
||||||
|
) as tag_names,
|
||||||
s.studio_name as studio_name,
|
s.studio_name as studio_name,
|
||||||
s.illust_id as studio_illust_id,
|
s.illust_id as studio_illust_id,
|
||||||
s.studio_desc as studio_desc,
|
s.studio_desc as studio_desc,
|
||||||
|
|
@ -482,7 +488,7 @@ type SearchTitlesRow struct {
|
||||||
EpisodesLen []byte `json:"episodes_len"`
|
EpisodesLen []byte `json:"episodes_len"`
|
||||||
TitleStorageType string `json:"title_storage_type"`
|
TitleStorageType string `json:"title_storage_type"`
|
||||||
TitleImagePath *string `json:"title_image_path"`
|
TitleImagePath *string `json:"title_image_path"`
|
||||||
TagNames []byte `json:"tag_names"`
|
TagNames interface{} `json:"tag_names"`
|
||||||
StudioName *string `json:"studio_name"`
|
StudioName *string `json:"studio_name"`
|
||||||
StudioIllustID *int64 `json:"studio_illust_id"`
|
StudioIllustID *int64 `json:"studio_illust_id"`
|
||||||
StudioDesc *string `json:"studio_desc"`
|
StudioDesc *string `json:"studio_desc"`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue