fix: resolve SQL type mismatch and conflict handling in LIGHTRAG_VDB_ENTITY insert query
This commit is contained in:
parent
1530798fb6
commit
0c39ff00a8
1 changed files with 2 additions and 2 deletions
|
|
@ -1673,7 +1673,7 @@ SQL_TEMPLATES = {
|
||||||
""",
|
""",
|
||||||
"upsert_entity": """INSERT INTO LIGHTRAG_VDB_ENTITY (workspace, id, entity_name, content,
|
"upsert_entity": """INSERT INTO LIGHTRAG_VDB_ENTITY (workspace, id, entity_name, content,
|
||||||
content_vector, chunk_ids, file_path)
|
content_vector, chunk_ids, file_path)
|
||||||
VALUES ($1, $2, $3, $4, $5, $6::varchar[], $7::varchar[])
|
VALUES ($1, $2, $3, $4, $5, $6::varchar[], $7)
|
||||||
ON CONFLICT (workspace,id) DO UPDATE
|
ON CONFLICT (workspace,id) DO UPDATE
|
||||||
SET entity_name=EXCLUDED.entity_name,
|
SET entity_name=EXCLUDED.entity_name,
|
||||||
content=EXCLUDED.content,
|
content=EXCLUDED.content,
|
||||||
|
|
@ -1684,7 +1684,7 @@ SQL_TEMPLATES = {
|
||||||
""",
|
""",
|
||||||
"upsert_relationship": """INSERT INTO LIGHTRAG_VDB_RELATION (workspace, id, source_id,
|
"upsert_relationship": """INSERT INTO LIGHTRAG_VDB_RELATION (workspace, id, source_id,
|
||||||
target_id, content, content_vector, chunk_ids, file_path)
|
target_id, content, content_vector, chunk_ids, file_path)
|
||||||
VALUES ($1, $2, $3, $4, $5, $6, $7::varchar[], $8::varchar[])
|
VALUES ($1, $2, $3, $4, $5, $6, $7::varchar[], $8)
|
||||||
ON CONFLICT (workspace,id) DO UPDATE
|
ON CONFLICT (workspace,id) DO UPDATE
|
||||||
SET source_id=EXCLUDED.source_id,
|
SET source_id=EXCLUDED.source_id,
|
||||||
target_id=EXCLUDED.target_id,
|
target_id=EXCLUDED.target_id,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue