Lineage task new (#11231)

* working on pipeline lineage fix

* solved issue for lineage not visible when added from pipeline to table

---------

Co-authored-by: Himank Mehta <himankmehta@Himanks-MacBook-Air.local>
This commit is contained in:
07Himank 2023-04-25 10:00:49 +05:30 committed by GitHub
parent f468bfb3bb
commit aa492ffda7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -665,13 +665,13 @@ public interface CollectionDAO {
@ConnectionAwareSqlQuery( @ConnectionAwareSqlQuery(
value = value =
"SELECT toId, toEntity, json FROM entity_relationship " "SELECT toId, toEntity, json FROM entity_relationship "
+ "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) =:fromId AND relation = :relation " + "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) =:fromId OR fromId = :fromId AND relation = :relation "
+ "ORDER BY toId", + "ORDER BY toId",
connectionType = MYSQL) connectionType = MYSQL)
@ConnectionAwareSqlQuery( @ConnectionAwareSqlQuery(
value = value =
"SELECT toId, toEntity, json FROM entity_relationship " "SELECT toId, toEntity, json FROM entity_relationship "
+ "WHERE json->'pipeline'->>'id' =:fromId AND relation = :relation " + "WHERE json->'pipeline'->>'id' =:fromId OR fromId = :fromId AND relation = :relation "
+ "ORDER BY toId", + "ORDER BY toId",
connectionType = POSTGRES) connectionType = POSTGRES)
@RegisterRowMapper(ToRelationshipMapper.class) @RegisterRowMapper(ToRelationshipMapper.class)
@ -702,13 +702,13 @@ public interface CollectionDAO {
@ConnectionAwareSqlQuery( @ConnectionAwareSqlQuery(
value = value =
"SELECT fromId, fromEntity, json FROM entity_relationship " "SELECT fromId, fromEntity, json FROM entity_relationship "
+ "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) = :toId AND relation = :relation " + "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) = :toId OR toId = :toId AND relation = :relation "
+ "ORDER BY fromId", + "ORDER BY fromId",
connectionType = MYSQL) connectionType = MYSQL)
@ConnectionAwareSqlQuery( @ConnectionAwareSqlQuery(
value = value =
"SELECT fromId, fromEntity, json FROM entity_relationship " "SELECT fromId, fromEntity, json FROM entity_relationship "
+ "WHERE json->'pipeline'->>'id' = :toId AND relation = :relation " + "WHERE json->'pipeline'->>'id' = :toId OR toId = :toId AND relation = :relation "
+ "ORDER BY fromId", + "ORDER BY fromId",
connectionType = POSTGRES) connectionType = POSTGRES)
@RegisterRowMapper(FromRelationshipMapper.class) @RegisterRowMapper(FromRelationshipMapper.class)