mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +00:00
parent
c4bac17b83
commit
df704fb566
@ -679,7 +679,8 @@ public interface CollectionDAO {
|
||||
@SqlQuery(
|
||||
"SELECT json FROM thread_entity WHERE updatedAt > :before AND resolved = :resolved AND (:type IS NULL OR type = :type) AND "
|
||||
+ "id in (SELECT fromFQN FROM field_relationship WHERE "
|
||||
+ "toFQN LIKE CONCAT(:fqnPrefix, '%') AND fromType='THREAD' AND toType LIKE CONCAT(:toType, '%') AND relation= :relation) "
|
||||
+ "(toFQN LIKE CONCAT(:fqnPrefix, '.%') OR toFQN=:fqnPrefix) AND fromType='THREAD' AND "
|
||||
+ "(toType LIKE CONCAT(:toType, '.%') OR toType=:toType) AND relation= :relation) "
|
||||
+ "ORDER BY updatedAt DESC "
|
||||
+ "LIMIT :limit")
|
||||
List<String> listThreadsByEntityLinkBefore(
|
||||
@ -695,7 +696,8 @@ public interface CollectionDAO {
|
||||
"SELECT json FROM thread_entity WHERE updatedAt < :after AND resolved = :resolved AND "
|
||||
+ "(:type IS NULL OR type = :type) AND "
|
||||
+ "id in (SELECT fromFQN FROM field_relationship WHERE "
|
||||
+ "toFQN LIKE CONCAT(:fqnPrefix, '%') AND fromType='THREAD' AND toType LIKE CONCAT(:toType, '%') AND relation= :relation) "
|
||||
+ "(toFQN LIKE CONCAT(:fqnPrefix, '.%') OR toFQN=:fqnPrefix) AND fromType='THREAD' AND "
|
||||
+ "(toType LIKE CONCAT(:toType, '.%') OR toType=:toType) AND relation= :relation) "
|
||||
+ "ORDER BY updatedAt DESC "
|
||||
+ "LIMIT :limit")
|
||||
List<String> listThreadsByEntityLinkAfter(
|
||||
@ -711,7 +713,8 @@ public interface CollectionDAO {
|
||||
"SELECT count(id) FROM thread_entity WHERE resolved = :resolved AND "
|
||||
+ "(:type IS NULL OR type = :type) AND "
|
||||
+ "id in (SELECT fromFQN FROM field_relationship WHERE "
|
||||
+ "toFQN LIKE CONCAT(:fqnPrefix, '%') AND fromType='THREAD' AND toType LIKE CONCAT(:toType, '%') AND relation= :relation)")
|
||||
+ "(toFQN LIKE CONCAT(:fqnPrefix, '.%') OR toFQN=:fqnPrefix) AND fromType='THREAD' AND "
|
||||
+ "(toType LIKE CONCAT(:toType, '.%') OR toType=:toType) AND relation= :relation)")
|
||||
int listCountThreadsByEntityLink(
|
||||
@Bind("fqnPrefix") String fqnPrefix,
|
||||
@Bind("toType") String toType,
|
||||
@ -727,7 +730,8 @@ public interface CollectionDAO {
|
||||
|
||||
@SqlQuery(
|
||||
"SELECT entityLink, COUNT(id) count FROM field_relationship fr INNER JOIN thread_entity te ON fr.fromFQN=te.id "
|
||||
+ "WHERE fr.toFQN LIKE CONCAT(:fqnPrefix, '%') AND fr.toType like concat(:toType, '%') AND fr.fromType = :fromType "
|
||||
+ "WHERE (fr.toFQN LIKE CONCAT(:fqnPrefix, '.%') OR fr.toFQN=:fqnPrefix) AND "
|
||||
+ "(fr.toType like concat(:toType, '.%') OR fr.toType=:toType)AND fr.fromType = :fromType "
|
||||
+ "AND fr.relation = :relation AND te.resolved= :isResolved AND (:type IS NULL OR te.type = :type) "
|
||||
+ "GROUP BY entityLink")
|
||||
@RegisterRowMapper(CountFieldMapper.class)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user