refactor: add meta field to knowledge user SQL queries
--bug=1058066 --user=刘瑞斌 [知识库]企业&专业版-普通用户查看飞书知识库的设置信息,账号信息显示空白 https://www.tapd.cn/62980211/s/1723533
This commit is contained in:
parent
35ee6eee02
commit
8f851aab61
@ -14,6 +14,7 @@ FROM (SELECT "temp_knowledge".id::text, "temp_knowledge".name,
|
|||||||
"temp_knowledge"."scope",
|
"temp_knowledge"."scope",
|
||||||
"temp_knowledge"."embedding_model_id"::text,
|
"temp_knowledge"."embedding_model_id"::text,
|
||||||
"document_temp"."char_length",
|
"document_temp"."char_length",
|
||||||
|
to_json("temp_knowledge".meta)::jsonb as meta,
|
||||||
CASE
|
CASE
|
||||||
WHEN
|
WHEN
|
||||||
"app_knowledge_temp"."count" IS NULL THEN 0
|
"app_knowledge_temp"."count" IS NULL THEN 0
|
||||||
@ -49,6 +50,7 @@ FROM (SELECT "temp_knowledge".id::text, "temp_knowledge".name,
|
|||||||
'WORKSPACE' as "scope",
|
'WORKSPACE' as "scope",
|
||||||
'' as embedding_model_id,
|
'' as embedding_model_id,
|
||||||
0 as char_length,
|
0 as char_length,
|
||||||
|
'{}'::jsonb as meta,
|
||||||
0 as application_mapping_count,
|
0 as application_mapping_count,
|
||||||
0 as document_count
|
0 as document_count
|
||||||
from knowledge_folder left join "user"
|
from knowledge_folder left join "user"
|
||||||
|
|||||||
@ -14,6 +14,7 @@ FROM (SELECT "temp_knowledge".id::text, "temp_knowledge".name,
|
|||||||
"temp_knowledge"."scope",
|
"temp_knowledge"."scope",
|
||||||
"temp_knowledge"."embedding_model_id"::text,
|
"temp_knowledge"."embedding_model_id"::text,
|
||||||
"document_temp"."char_length",
|
"document_temp"."char_length",
|
||||||
|
to_json("temp_knowledge".meta)::jsonb as meta,
|
||||||
CASE
|
CASE
|
||||||
WHEN
|
WHEN
|
||||||
"app_knowledge_temp"."count" IS NULL THEN 0
|
"app_knowledge_temp"."count" IS NULL THEN 0
|
||||||
@ -63,6 +64,7 @@ FROM (SELECT "temp_knowledge".id::text, "temp_knowledge".name,
|
|||||||
'WORKSPACE' as "scope",
|
'WORKSPACE' as "scope",
|
||||||
'' as embedding_model_id,
|
'' as embedding_model_id,
|
||||||
0 as char_length,
|
0 as char_length,
|
||||||
|
'{}'::jsonb as meta,
|
||||||
0 as application_mapping_count,
|
0 as application_mapping_count,
|
||||||
0 as document_count
|
0 as document_count
|
||||||
from knowledge_folder left join "user"
|
from knowledge_folder left join "user"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user