sql

package
v0.1.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, dao *datly.Service, connectorRef string, stateStore workspace.StateStore, fallback reportstore.Client) (reportstore.Client, error)

func NewAuditSink

func NewAuditSink(store *Store) reportingsvc.AuditSink

func WithInternalAccess

func WithInternalAccess(ctx context.Context) context.Context

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) AdoptReportRunAndContextCAS added in v0.1.23

func (s *Store) AdoptReportRunAndContextCAS(ctx context.Context, run *reportrun.Record, expectedRunRevision int64, record *reportcontext.Record, expectedContextRevision int64) error

AdoptReportRunAndContextCAS binds the completed manual run and advances the conversation pointer in one SQL transaction.

func (*Store) ClaimJob added in v0.1.23

func (s *Store) ClaimJob(ctx context.Context, jobID string, startedAt time.Time) (*reportjob.Record, error)

func (*Store) CompleteJobWithArtifact added in v0.1.23

func (s *Store) CompleteJobWithArtifact(ctx context.Context, jobID string, artifact *reportartifact.Record, diagnostics []byte, completedAt time.Time, retentionTTL time.Duration) (*reportjob.Record, error)

func (*Store) CreateJob

func (s *Store) CreateJob(ctx context.Context, job *reportjob.Record) error

func (*Store) CreateReportRun added in v0.1.23

func (s *Store) CreateReportRun(ctx context.Context, run *reportrun.Record) error

CreateReportRun persists a new owner-scoped browser materialization.

func (*Store) CreateSharedArtifact

func (s *Store) CreateSharedArtifact(ctx context.Context, artifact *reportshareartifact.Record) error

func (*Store) DeleteSharedArtifact added in v0.1.23

func (s *Store) DeleteSharedArtifact(ctx context.Context, artifactID string) error

DeleteSharedArtifact removes an owned shared reporting artifact.

func (*Store) FailJob added in v0.1.23

func (s *Store) FailJob(ctx context.Context, jobID, errorText string, diagnostics []byte, completedAt time.Time) (*reportjob.Record, error)

func (*Store) GetArtifact

func (s *Store) GetArtifact(ctx context.Context, artifactID string) (*reportartifact.Record, error)

func (*Store) GetConversationReportContext added in v0.1.23

func (s *Store) GetConversationReportContext(ctx context.Context, conversationID string) (*reportcontext.Record, error)

GetConversationReportContext loads the active run pointer for an exact owner+conversation pair.

func (*Store) GetJob

func (s *Store) GetJob(ctx context.Context, jobID string) (*reportjob.Record, error)

func (*Store) GetReportRun added in v0.1.23

func (s *Store) GetReportRun(ctx context.Context, reportRunID string) (*reportrun.Record, error)

GetReportRun loads a browser run in the authenticated owner scope.

func (*Store) GetReportRunByRequestID added in v0.1.23

func (s *Store) GetReportRunByRequestID(ctx context.Context, uiRunRequestID string) (*reportrun.Record, error)

GetReportRunByRequestID resolves a transport retry in owner scope.

func (*Store) GetSharedArtifact

func (s *Store) GetSharedArtifact(ctx context.Context, artifactID string) (*reportshareartifact.Record, error)

func (*Store) ListArtifacts

func (s *Store) ListArtifacts(ctx context.Context) ([]*reportartifact.Record, error)

func (*Store) ListJobs

func (s *Store) ListJobs(ctx context.Context) ([]*reportjob.Record, error)

func (*Store) ListSharedArtifacts

func (s *Store) ListSharedArtifacts(ctx context.Context) ([]*reportshareartifact.Record, error)

func (*Store) PutArtifact

func (s *Store) PutArtifact(ctx context.Context, artifact *reportartifact.Record) error

func (*Store) PutConversationReportContextCAS added in v0.1.23

func (s *Store) PutConversationReportContextCAS(ctx context.Context, record *reportcontext.Record, expectedRevision int64) error

PutConversationReportContextCAS creates revision one from expected zero or updates an exact existing revision.

func (*Store) ReconcileRunningJobs added in v0.1.23

func (s *Store) ReconcileRunningJobs(ctx context.Context, staleBefore, reconciledAt time.Time, errorText string) ([]*reportjob.Record, error)

func (*Store) SubmitJobFromRun added in v0.1.23

func (s *Store) SubmitJobFromRun(ctx context.Context, candidate *reportjob.Record) (*reportjob.Record, bool, error)

func (*Store) UpdateJob

func (s *Store) UpdateJob(ctx context.Context, job *reportjob.Record) error

func (*Store) UpdateReportRunCAS added in v0.1.23

func (s *Store) UpdateReportRunCAS(ctx context.Context, run *reportrun.Record, expectedRevision int64) error

UpdateReportRunCAS replaces a run only when its owner and revision match.

func (*Store) UpdateSharedArtifact

func (s *Store) UpdateSharedArtifact(ctx context.Context, artifact *reportshareartifact.Record) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL