Refactor ORDER BY clauses in edges and nodes to use created_at instead of uuid for better chronological sorting (#322)
* Refactor ORDER BY clauses in edges and nodes to use created_at instead of uuid for better chronological sorting * Update ORDER BY clauses in edges and nodes to include uuid for improved sorting consistency
This commit is contained in:
parent
6b12896723
commit
65b5eeae88
2 changed files with 6 additions and 6 deletions
|
|
@ -161,7 +161,7 @@ class EpisodicEdge(Edge):
|
||||||
n.uuid AS source_node_uuid,
|
n.uuid AS source_node_uuid,
|
||||||
m.uuid AS target_node_uuid,
|
m.uuid AS target_node_uuid,
|
||||||
e.created_at AS created_at
|
e.created_at AS created_at
|
||||||
ORDER BY e.uuid DESC
|
ORDER BY e.created_at, e.uuid DESC
|
||||||
"""
|
"""
|
||||||
+ limit_query,
|
+ limit_query,
|
||||||
group_ids=group_ids,
|
group_ids=group_ids,
|
||||||
|
|
@ -322,7 +322,7 @@ class EntityEdge(Edge):
|
||||||
e.expired_at AS expired_at,
|
e.expired_at AS expired_at,
|
||||||
e.valid_at AS valid_at,
|
e.valid_at AS valid_at,
|
||||||
e.invalid_at AS invalid_at
|
e.invalid_at AS invalid_at
|
||||||
ORDER BY e.uuid DESC
|
ORDER BY e.created_at, e.uuid DESC
|
||||||
"""
|
"""
|
||||||
+ limit_query,
|
+ limit_query,
|
||||||
group_ids=group_ids,
|
group_ids=group_ids,
|
||||||
|
|
@ -448,7 +448,7 @@ class CommunityEdge(Edge):
|
||||||
n.uuid AS source_node_uuid,
|
n.uuid AS source_node_uuid,
|
||||||
m.uuid AS target_node_uuid,
|
m.uuid AS target_node_uuid,
|
||||||
e.created_at AS created_at
|
e.created_at AS created_at
|
||||||
ORDER BY e.uuid DESC
|
ORDER BY e.created_at, e.uuid DESC
|
||||||
"""
|
"""
|
||||||
+ limit_query,
|
+ limit_query,
|
||||||
group_ids=group_ids,
|
group_ids=group_ids,
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ class EpisodicNode(Node):
|
||||||
e.source_description AS source_description,
|
e.source_description AS source_description,
|
||||||
e.source AS source,
|
e.source AS source,
|
||||||
e.entity_edges AS entity_edges
|
e.entity_edges AS entity_edges
|
||||||
ORDER BY e.uuid DESC
|
ORDER BY e.created_at, e.uuid DESC
|
||||||
"""
|
"""
|
||||||
+ limit_query,
|
+ limit_query,
|
||||||
group_ids=group_ids,
|
group_ids=group_ids,
|
||||||
|
|
@ -368,7 +368,7 @@ class EntityNode(Node):
|
||||||
n.summary AS summary,
|
n.summary AS summary,
|
||||||
labels(n) AS labels,
|
labels(n) AS labels,
|
||||||
properties(n) AS attributes
|
properties(n) AS attributes
|
||||||
ORDER BY n.uuid DESC
|
ORDER BY n.created_at DESC
|
||||||
"""
|
"""
|
||||||
+ limit_query,
|
+ limit_query,
|
||||||
group_ids=group_ids,
|
group_ids=group_ids,
|
||||||
|
|
@ -483,7 +483,7 @@ class CommunityNode(Node):
|
||||||
n.group_id AS group_id,
|
n.group_id AS group_id,
|
||||||
n.created_at AS created_at,
|
n.created_at AS created_at,
|
||||||
n.summary AS summary
|
n.summary AS summary
|
||||||
ORDER BY n.uuid DESC
|
ORDER BY n.created_at DESC
|
||||||
"""
|
"""
|
||||||
+ limit_query,
|
+ limit_query,
|
||||||
group_ids=group_ids,
|
group_ids=group_ids,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue