MCPcopy Create free account
hub / github.com/bcspragu/logseq-sync / getTxid

Method getTxid

cmd/server/main.go:714–724  ·  view source on GitHub ↗
(ctx context.Context, req *getTxidRequest)

Source from the content-addressed store, hash-verified

712}
713
714func (s *server) getTxid(ctx context.Context, req *getTxidRequest) (*getTxidResponse, error) {
715 tx, err := s.db.Tx(ctx, db.GraphID(req.GraphUUID))
716 if db.IsNotExists(err) {
717 return nil, httperr.NotFound("graph %q wasn't found", req.GraphUUID)
718 } else if err != nil {
719 return nil, httperr.Internal("failed to load graph: %w", err)
720 }
721 return &getTxidResponse{
722 Txid: int64(tx),
723 }, nil
724}
725
726type getDeletionRequest struct {
727 GraphUUID string `json:"GraphUUID"`

Callers

nothing calls this directly

Calls 5

GraphIDTypeAlias · 0.92
IsNotExistsFunction · 0.92
NotFoundFunction · 0.92
InternalFunction · 0.92
TxMethod · 0.65

Tested by

no test coverage detected