Documentation ¶
Index ¶
- type Batch
- type BatchFile
- type Batchrow
- type BulkInsertIntoBatchRowsParams
- type CountBatchRowsByBatchIDAndStatusParams
- type DBTX
- type FetchBatchRowsForBatchDoneRow
- type FetchBlockOfRowsParams
- type FetchBlockOfRowsRow
- type GetBatchRowsByBatchIDSortedRow
- type GetBatchStatusAndOutputFilesRow
- type GetPendingBatchRowsRow
- type GetProcessedBatchRowsByBatchIDSortedRow
- type InsertBatchFileParams
- type InsertIntoBatchRowsParams
- type InsertIntoBatchesParams
- type NullStatusEnum
- type Querier
- type Queries
- func (q *Queries) BulkInsertIntoBatchRows(ctx context.Context, arg BulkInsertIntoBatchRowsParams) (int64, error)
- func (q *Queries) CountBatchRowsByBatchIDAndStatus(ctx context.Context, arg CountBatchRowsByBatchIDAndStatusParams) (int64, error)
- func (q *Queries) FetchBatchRowsForBatchDone(ctx context.Context, batch uuid.UUID) ([]FetchBatchRowsForBatchDoneRow, error)
- func (q *Queries) FetchBlockOfRows(ctx context.Context, arg FetchBlockOfRowsParams) ([]FetchBlockOfRowsRow, error)
- func (q *Queries) GetBatchByID(ctx context.Context, id uuid.UUID) (Batch, error)
- func (q *Queries) GetBatchRowsByBatchID(ctx context.Context, batch uuid.UUID) ([]Batchrow, error)
- func (q *Queries) GetBatchRowsByBatchIDSorted(ctx context.Context, batch uuid.UUID) ([]GetBatchRowsByBatchIDSortedRow, error)
- func (q *Queries) GetBatchRowsCount(ctx context.Context, batch uuid.UUID) (int64, error)
- func (q *Queries) GetBatchStatus(ctx context.Context, id uuid.UUID) (StatusEnum, error)
- func (q *Queries) GetBatchStatusAndOutputFiles(ctx context.Context, id uuid.UUID) (GetBatchStatusAndOutputFilesRow, error)
- func (q *Queries) GetCompletedBatches(ctx context.Context) ([]uuid.UUID, error)
- func (q *Queries) GetPendingBatchRows(ctx context.Context, batch uuid.UUID) ([]GetPendingBatchRowsRow, error)
- func (q *Queries) GetProcessedBatchRowsByBatchIDSorted(ctx context.Context, batch uuid.UUID) ([]GetProcessedBatchRowsByBatchIDSortedRow, error)
- func (q *Queries) InsertBatchFile(ctx context.Context, arg InsertBatchFileParams) error
- func (q *Queries) InsertIntoBatchRows(ctx context.Context, arg InsertIntoBatchRowsParams) error
- func (q *Queries) InsertIntoBatches(ctx context.Context, arg InsertIntoBatchesParams) (uuid.UUID, error)
- func (q *Queries) UpdateBatchCounters(ctx context.Context, arg UpdateBatchCountersParams) error
- func (q *Queries) UpdateBatchOutputFiles(ctx context.Context, arg UpdateBatchOutputFilesParams) error
- func (q *Queries) UpdateBatchResult(ctx context.Context, arg UpdateBatchResultParams) error
- func (q *Queries) UpdateBatchRowStatus(ctx context.Context, arg UpdateBatchRowStatusParams) error
- func (q *Queries) UpdateBatchRowsBatchJob(ctx context.Context, arg UpdateBatchRowsBatchJobParams) error
- func (q *Queries) UpdateBatchRowsSlowQuery(ctx context.Context, arg UpdateBatchRowsSlowQueryParams) error
- func (q *Queries) UpdateBatchRowsStatus(ctx context.Context, arg UpdateBatchRowsStatusParams) error
- func (q *Queries) UpdateBatchStatus(ctx context.Context, arg UpdateBatchStatusParams) error
- func (q *Queries) UpdateBatchSummary(ctx context.Context, arg UpdateBatchSummaryParams) error
- func (q *Queries) UpdateBatchSummaryOnAbort(ctx context.Context, arg UpdateBatchSummaryOnAbortParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type StatusEnum
- type UpdateBatchCountersParams
- type UpdateBatchOutputFilesParams
- type UpdateBatchResultParams
- type UpdateBatchRowStatusParams
- type UpdateBatchRowsBatchJobParams
- type UpdateBatchRowsSlowQueryParams
- type UpdateBatchRowsStatusParams
- type UpdateBatchStatusParams
- type UpdateBatchSummaryOnAbortParams
- type UpdateBatchSummaryParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { ID uuid.UUID `json:"id"` App string `json:"app"` Op string `json:"op"` Context []byte `json:"context"` Inputfile pgtype.Text `json:"inputfile"` Status StatusEnum `json:"status"` Reqat pgtype.Timestamp `json:"reqat"` Doneat pgtype.Timestamp `json:"doneat"` Outputfiles []byte `json:"outputfiles"` Nsuccess pgtype.Int4 `json:"nsuccess"` Nfailed pgtype.Int4 `json:"nfailed"` Naborted pgtype.Int4 `json:"naborted"` CreatedAt pgtype.Timestamp `json:"created_at"` }
type BatchFile ¶ added in v0.12.0
type BatchFile struct { // Unique identifier for each batch file record ID int32 `json:"id"` // Reference to the associated batch in the batches table BatchID uuid.UUID `json:"batch_id"` // Unique identifier for the file in the object store ObjectID string `json:"object_id"` // Original name of the file Filename string `json:"filename"` // Size of the file in bytes Size int64 `json:"size"` // Hash or checksum of the file contents for integrity verification Checksum string `json:"checksum"` // MIME type of the file ContentType string `json:"content_type"` // Indicates whether the file was successfully processed (TRUE) or failed (FALSE) Status bool `json:"status"` // Timestamp when the file was received and stored in the object store ReceivedAt pgtype.Timestamptz `json:"received_at"` // Timestamp when the file was processed by the batch system ProcessedAt pgtype.Timestamptz `json:"processed_at"` // Contains any error message if the file processing failed ErrorMessage pgtype.Text `json:"error_message"` // Additional metadata about the file in JSONB format Metadata []byte `json:"metadata"` CreatedAt pgtype.Timestamp `json:"created_at"` }
Stores metadata for files associated with batch jobs
type Batchrow ¶
type Batchrow struct { Rowid int64 `json:"rowid"` Batch uuid.UUID `json:"batch"` Line int32 `json:"line"` Input []byte `json:"input"` Status StatusEnum `json:"status"` Reqat pgtype.Timestamp `json:"reqat"` Doneat pgtype.Timestamp `json:"doneat"` Res []byte `json:"res"` Blobrows []byte `json:"blobrows"` Messages []byte `json:"messages"` Doneby pgtype.Text `json:"doneby"` CreatedAt pgtype.Timestamp `json:"created_at"` }
type CountBatchRowsByBatchIDAndStatusParams ¶
type CountBatchRowsByBatchIDAndStatusParams struct { Batch uuid.UUID `json:"batch"` Status StatusEnum `json:"status"` Status_2 StatusEnum `json:"status_2"` }
type FetchBatchRowsForBatchDoneRow ¶
type FetchBatchRowsForBatchDoneRow struct { Line int32 `json:"line"` Status StatusEnum `json:"status"` Res []byte `json:"res"` Messages []byte `json:"messages"` }
type FetchBlockOfRowsParams ¶
type FetchBlockOfRowsParams struct { Status StatusEnum `json:"status"` Limit int32 `json:"limit"` }
type FetchBlockOfRowsRow ¶
type GetBatchRowsByBatchIDSortedRow ¶
type GetBatchRowsByBatchIDSortedRow struct { Rowid int64 `json:"rowid"` Line int32 `json:"line"` Input []byte `json:"input"` Status StatusEnum `json:"status"` Reqat pgtype.Timestamp `json:"reqat"` Doneat pgtype.Timestamp `json:"doneat"` Res []byte `json:"res"` Blobrows []byte `json:"blobrows"` Messages []byte `json:"messages"` Doneby pgtype.Text `json:"doneby"` }
type GetBatchStatusAndOutputFilesRow ¶ added in v0.13.0
type GetBatchStatusAndOutputFilesRow struct { Status StatusEnum `json:"status"` Outputfiles []byte `json:"outputfiles"` Res []byte `json:"res"` }
type GetPendingBatchRowsRow ¶
type GetPendingBatchRowsRow struct { Rowid int64 `json:"rowid"` Line int32 `json:"line"` Input []byte `json:"input"` Status StatusEnum `json:"status"` Reqat pgtype.Timestamp `json:"reqat"` Doneat pgtype.Timestamp `json:"doneat"` Res []byte `json:"res"` Blobrows []byte `json:"blobrows"` Messages []byte `json:"messages"` Doneby pgtype.Text `json:"doneby"` }
type GetProcessedBatchRowsByBatchIDSortedRow ¶
type GetProcessedBatchRowsByBatchIDSortedRow struct { Rowid int64 `json:"rowid"` Line int32 `json:"line"` Input []byte `json:"input"` Status StatusEnum `json:"status"` Reqat pgtype.Timestamp `json:"reqat"` Doneat pgtype.Timestamp `json:"doneat"` Res []byte `json:"res"` Blobrows []byte `json:"blobrows"` Messages []byte `json:"messages"` Doneby pgtype.Text `json:"doneby"` }
type InsertBatchFileParams ¶ added in v0.12.0
type InsertBatchFileParams struct { BatchID uuid.UUID `json:"batch_id"` ObjectID string `json:"object_id"` Filename string `json:"filename"` Size int64 `json:"size"` Checksum string `json:"checksum"` ContentType string `json:"content_type"` Status bool `json:"status"` ReceivedAt pgtype.Timestamptz `json:"received_at"` Metadata []byte `json:"metadata"` }
type InsertIntoBatchesParams ¶
type NullStatusEnum ¶
type NullStatusEnum struct { StatusEnum StatusEnum `json:"status_enum"` Valid bool `json:"valid"` // Valid is true if StatusEnum is not NULL }
func (*NullStatusEnum) Scan ¶
func (ns *NullStatusEnum) Scan(value interface{}) error
Scan implements the Scanner interface.
type Querier ¶
type Querier interface { BulkInsertIntoBatchRows(ctx context.Context, arg BulkInsertIntoBatchRowsParams) (int64, error) CountBatchRowsByBatchIDAndStatus(ctx context.Context, arg CountBatchRowsByBatchIDAndStatusParams) (int64, error) FetchBatchRowsForBatchDone(ctx context.Context, batch uuid.UUID) ([]FetchBatchRowsForBatchDoneRow, error) FetchBlockOfRows(ctx context.Context, arg FetchBlockOfRowsParams) ([]FetchBlockOfRowsRow, error) GetBatchByID(ctx context.Context, id uuid.UUID) (Batch, error) GetBatchRowsByBatchID(ctx context.Context, batch uuid.UUID) ([]Batchrow, error) GetBatchRowsByBatchIDSorted(ctx context.Context, batch uuid.UUID) ([]GetBatchRowsByBatchIDSortedRow, error) GetBatchRowsCount(ctx context.Context, batch uuid.UUID) (int64, error) GetBatchStatus(ctx context.Context, id uuid.UUID) (StatusEnum, error) GetBatchStatusAndOutputFiles(ctx context.Context, id uuid.UUID) (GetBatchStatusAndOutputFilesRow, error) GetCompletedBatches(ctx context.Context) ([]uuid.UUID, error) GetPendingBatchRows(ctx context.Context, batch uuid.UUID) ([]GetPendingBatchRowsRow, error) GetProcessedBatchRowsByBatchIDSorted(ctx context.Context, batch uuid.UUID) ([]GetProcessedBatchRowsByBatchIDSortedRow, error) InsertBatchFile(ctx context.Context, arg InsertBatchFileParams) error InsertIntoBatchRows(ctx context.Context, arg InsertIntoBatchRowsParams) error InsertIntoBatches(ctx context.Context, arg InsertIntoBatchesParams) (uuid.UUID, error) UpdateBatchCounters(ctx context.Context, arg UpdateBatchCountersParams) error UpdateBatchOutputFiles(ctx context.Context, arg UpdateBatchOutputFilesParams) error UpdateBatchResult(ctx context.Context, arg UpdateBatchResultParams) error UpdateBatchRowStatus(ctx context.Context, arg UpdateBatchRowStatusParams) error UpdateBatchRowsBatchJob(ctx context.Context, arg UpdateBatchRowsBatchJobParams) error UpdateBatchRowsSlowQuery(ctx context.Context, arg UpdateBatchRowsSlowQueryParams) error UpdateBatchRowsStatus(ctx context.Context, arg UpdateBatchRowsStatusParams) error UpdateBatchStatus(ctx context.Context, arg UpdateBatchStatusParams) error UpdateBatchSummary(ctx context.Context, arg UpdateBatchSummaryParams) error UpdateBatchSummaryOnAbort(ctx context.Context, arg UpdateBatchSummaryOnAbortParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) BulkInsertIntoBatchRows ¶
func (*Queries) CountBatchRowsByBatchIDAndStatus ¶
func (*Queries) FetchBatchRowsForBatchDone ¶
func (*Queries) FetchBlockOfRows ¶
func (q *Queries) FetchBlockOfRows(ctx context.Context, arg FetchBlockOfRowsParams) ([]FetchBlockOfRowsRow, error)
func (*Queries) GetBatchByID ¶
func (*Queries) GetBatchRowsByBatchID ¶
func (*Queries) GetBatchRowsByBatchIDSorted ¶
func (*Queries) GetBatchRowsCount ¶
func (*Queries) GetBatchStatus ¶
func (*Queries) GetBatchStatusAndOutputFiles ¶ added in v0.13.0
func (*Queries) GetCompletedBatches ¶
func (*Queries) GetPendingBatchRows ¶
func (*Queries) GetProcessedBatchRowsByBatchIDSorted ¶
func (*Queries) InsertBatchFile ¶ added in v0.12.0
func (q *Queries) InsertBatchFile(ctx context.Context, arg InsertBatchFileParams) error
func (*Queries) InsertIntoBatchRows ¶
func (q *Queries) InsertIntoBatchRows(ctx context.Context, arg InsertIntoBatchRowsParams) error
func (*Queries) InsertIntoBatches ¶
func (*Queries) UpdateBatchCounters ¶
func (q *Queries) UpdateBatchCounters(ctx context.Context, arg UpdateBatchCountersParams) error
func (*Queries) UpdateBatchOutputFiles ¶
func (q *Queries) UpdateBatchOutputFiles(ctx context.Context, arg UpdateBatchOutputFilesParams) error
func (*Queries) UpdateBatchResult ¶ added in v0.13.0
func (q *Queries) UpdateBatchResult(ctx context.Context, arg UpdateBatchResultParams) error
func (*Queries) UpdateBatchRowStatus ¶
func (q *Queries) UpdateBatchRowStatus(ctx context.Context, arg UpdateBatchRowStatusParams) error
func (*Queries) UpdateBatchRowsBatchJob ¶
func (q *Queries) UpdateBatchRowsBatchJob(ctx context.Context, arg UpdateBatchRowsBatchJobParams) error
func (*Queries) UpdateBatchRowsSlowQuery ¶
func (q *Queries) UpdateBatchRowsSlowQuery(ctx context.Context, arg UpdateBatchRowsSlowQueryParams) error
func (*Queries) UpdateBatchRowsStatus ¶
func (q *Queries) UpdateBatchRowsStatus(ctx context.Context, arg UpdateBatchRowsStatusParams) error
func (*Queries) UpdateBatchStatus ¶
func (q *Queries) UpdateBatchStatus(ctx context.Context, arg UpdateBatchStatusParams) error
func (*Queries) UpdateBatchSummary ¶
func (q *Queries) UpdateBatchSummary(ctx context.Context, arg UpdateBatchSummaryParams) error
func (*Queries) UpdateBatchSummaryOnAbort ¶
func (q *Queries) UpdateBatchSummaryOnAbort(ctx context.Context, arg UpdateBatchSummaryOnAbortParams) error
type StatusEnum ¶
type StatusEnum string
const ( StatusEnumQueued StatusEnum = "queued" StatusEnumInprog StatusEnum = "inprog" StatusEnumSuccess StatusEnum = "success" StatusEnumFailed StatusEnum = "failed" StatusEnumAborted StatusEnum = "aborted" StatusEnumWait StatusEnum = "wait" )
func (*StatusEnum) Scan ¶
func (e *StatusEnum) Scan(src interface{}) error
type UpdateBatchResultParams ¶ added in v0.13.0
type UpdateBatchRowStatusParams ¶
type UpdateBatchRowStatusParams struct { Rowid int64 `json:"rowid"` Status StatusEnum `json:"status"` }
type UpdateBatchRowsStatusParams ¶
type UpdateBatchRowsStatusParams struct { Status StatusEnum `json:"status"` Column2 []int64 `json:"column_2"` }
type UpdateBatchStatusParams ¶
Click to show internal directories.
Click to hide internal directories.