Skip to content

Commit

Permalink
List performance (#1679)
Browse files Browse the repository at this point in the history
* wip(daemon): recursive get publications

* wip(daemon): add trusted only

* wip(daemon): remove resource duplicates

* wip(daemon): exclude drafts from listPublications

* wip(daemon): remove children from tests

* fix(daemon): Don't report drafts on listpublications

* wip(daemon): list drafts

* wip(daemon): include mentions

* fix(daemon): account for untitled documents

* fix(daemon): update migration to match schema

* wip(daemon): page token on list drafts

* wip(daemon): page token on list documents

* implementing pagination in the frontend WIP

* revert pagination in accounts model

---------

Co-authored-by: Horacio Herrera <[email protected]>
  • Loading branch information
juligasa and horacioh authored Mar 29, 2024
1 parent 0e8405f commit fdac551
Show file tree
Hide file tree
Showing 20 changed files with 612 additions and 160 deletions.
2 changes: 1 addition & 1 deletion backend/daemon/api/activity/v1alpha/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (srv *Server) ListEvents(ctx context.Context, req *activity.ListEventsReque
joinIDStr = "JOIN " + storage.Blobs.String() + " ON " + storage.BlobsID.String() + "=" + storage.StructuralBlobsID.String()
joinpkStr = "JOIN " + storage.PublicKeys.String() + " ON " + storage.StructuralBlobsAuthor.String() + "=" + storage.PublicKeysID.String()
leftjoinStr = "LEFT JOIN " + storage.Resources.String() + " ON " + storage.StructuralBlobsResource.String() + "=" + storage.ResourcesID.String()
pageTokenStr = storage.BlobsID.String() + " <= :idx AND (" + storage.ResourcesIRI.String() + " NOT IN (SELECT " + storage.DraftsViewResource.String() + " from " + storage.DraftsView.String() + ") OR " + storage.ResourcesIRI.String() + " IS NULL) ORDER BY " + storage.BlobsID.String() + " desc limit :page_token"
pageTokenStr = storage.BlobsID.String() + " <= :idx AND (" + storage.ResourcesIRI.String() + " NOT IN (SELECT " + storage.DraftsViewResource.String() + " from " + storage.DraftsView.String() + ") OR " + storage.ResourcesIRI.String() + " IS NULL) ORDER BY " + storage.BlobsID.String() + " desc limit :page_size"
)

var getEventsStr = fmt.Sprintf(`
Expand Down
Loading

0 comments on commit fdac551

Please sign in to comment.