// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.29.0

package lrdb

import (
	"context"
	"time"

	"github.com/google/uuid"
	"github.com/jackc/pgx/v5/pgconn"
)

type Querier interface {
	BatchDeleteMetricSegs(ctx context.Context, arg []BatchDeleteMetricSegsParams) *BatchDeleteMetricSegsBatchResults
	BatchMarkMetricSegsRolledup(ctx context.Context, arg []BatchMarkMetricSegsRolledupParams) *BatchMarkMetricSegsRolledupBatchResults
	// This will upsert a new log exemplar. Exemplar and updated_at are always updated
	// to the provided values. If old_fingerprint is not 0, it is added to the list of related
	// fingerprints. This means the "old" fingerprint should be fingerprint, so it always updates
	// an existing record, not changing it to the new one.
	// The return value is a boolean indicating if the record is new.
	BatchUpsertExemplarLogs(ctx context.Context, arg []BatchUpsertExemplarLogsParams) *BatchUpsertExemplarLogsBatchResults
	BatchUpsertExemplarMetrics(ctx context.Context, arg []BatchUpsertExemplarMetricsParams) *BatchUpsertExemplarMetricsBatchResults
	BatchUpsertExemplarTraces(ctx context.Context, arg []BatchUpsertExemplarTracesParams) *BatchUpsertExemplarTracesBatchResults
	CallExpirePublishedByIngestCutoff(ctx context.Context, arg CallExpirePublishedByIngestCutoffParams) (int64, error)
	CallFindOrgPartition(ctx context.Context, arg CallFindOrgPartitionParams) (string, error)
	CleanupKafkaOffsets(ctx context.Context, arg CleanupKafkaOffsetsParams) (int64, error)
	CleanupKafkaOffsetsByAge(ctx context.Context, createdBefore time.Time) (int64, error)
	// Retrieves all pack estimates for a specific signal type
	GetAllBySignal(ctx context.Context, signal string) ([]GetAllBySignalRow, error)
	// Retrieves all existing pack estimates for EWMA calculations across all signals
	GetAllPackEstimates(ctx context.Context) ([]GetAllPackEstimatesRow, error)
	GetLabelNameMaps(ctx context.Context, arg GetLabelNameMapsParams) ([]GetLabelNameMapsRow, error)
	GetLogSeg(ctx context.Context, arg GetLogSegParams) (LogSeg, error)
	GetLogSegmentsForDownload(ctx context.Context, arg GetLogSegmentsForDownloadParams) ([]LogSeg, error)
	GetMetricLabelNameMaps(ctx context.Context, arg GetMetricLabelNameMapsParams) ([]GetMetricLabelNameMapsRow, error)
	// Retrieves metric pack estimates for EWMA calculations (backward compatibility)
	GetMetricPackEstimates(ctx context.Context) ([]GetMetricPackEstimatesRow, error)
	GetMetricSeg(ctx context.Context, arg GetMetricSegParams) (MetricSeg, error)
	GetMetricSegmentsForDownload(ctx context.Context, arg GetMetricSegmentsForDownloadParams) ([]MetricSeg, error)
	GetMetricSegsByIds(ctx context.Context, arg GetMetricSegsByIdsParams) ([]MetricSeg, error)
	GetMetricType(ctx context.Context, arg GetMetricTypeParams) (string, error)
	GetTraceLabelNameMaps(ctx context.Context, arg GetTraceLabelNameMapsParams) ([]GetTraceLabelNameMapsRow, error)
	GetTraceSeg(ctx context.Context, arg GetTraceSegParams) (TraceSeg, error)
	GetTraceSegmentsForDownload(ctx context.Context, arg GetTraceSegmentsForDownloadParams) ([]TraceSeg, error)
	InsertKafkaOffsets(ctx context.Context, arg InsertKafkaOffsetsParams) error
	KafkaOffsetsAfter(ctx context.Context, arg KafkaOffsetsAfterParams) ([]int64, error)
	// Extract tag keys from label_name_map in log_seg table
	// Returns all keys from label_name_map (for v2 APIs)
	// Handler code can filter by non-empty values for v1 legacy API support
	// Includes today's and yesterday's dateint for partition pruning
	ListLogQLTags(ctx context.Context, arg ListLogQLTagsParams) ([]string, error)
	ListLogSegmentsForQuery(ctx context.Context, arg ListLogSegmentsForQueryParams) ([]ListLogSegmentsForQueryRow, error)
	ListMetricSegmentsForQuery(ctx context.Context, arg ListMetricSegmentsForQueryParams) ([]ListMetricSegmentsForQueryRow, error)
	// Extract tag keys from label_name_map in metric_seg table for a specific metric
	// Filters by metric fingerprint to return tags only for the requested metric
	// Returns underscored tag keys (for v2 APIs)
	// Legacy API uses denormalizer to convert to dotted names
	// Includes today's and yesterday's dateint for partition pruning
	ListPromMetricTags(ctx context.Context, arg ListPromMetricTagsParams) ([]string, error)
	ListPromMetrics(ctx context.Context, organizationID uuid.UUID) ([]ListPromMetricsRow, error)
	ListServiceMetrics(ctx context.Context, arg ListServiceMetricsParams) ([]string, error)
	ListServiceNames(ctx context.Context, organizationID uuid.UUID) ([]string, error)
	// Extract tag keys from label_name_map in trace_seg table
	// Returns all keys from label_name_map (for v2 APIs)
	// Handler code can filter by non-empty values for v1 legacy API support
	// Includes today's and yesterday's dateint for partition pruning
	ListSpanTags(ctx context.Context, arg ListSpanTagsParams) ([]string, error)
	ListTraceSegmentsForQuery(ctx context.Context, arg ListTraceSegmentsForQueryParams) ([]ListTraceSegmentsForQueryRow, error)
	// Returns an estimate of the number of log segments, accounting for per-file overhead.
	LogSegEstimator(ctx context.Context, arg LogSegEstimatorParams) ([]LogSegEstimatorRow, error)
	LogSegmentCleanupBatchDelete(ctx context.Context, arg []LogSegmentCleanupBatchDeleteParams) *LogSegmentCleanupBatchDeleteBatchResults
	LogSegmentCleanupDelete(ctx context.Context, arg LogSegmentCleanupDeleteParams) error
	LogSegmentCleanupGet(ctx context.Context, arg LogSegmentCleanupGetParams) ([]LogSegmentCleanupGetRow, error)
	MarkLogSegsCompactedByKeys(ctx context.Context, arg MarkLogSegsCompactedByKeysParams) error
	MarkMetricSegsCompactedByKeys(ctx context.Context, arg MarkMetricSegsCompactedByKeysParams) error
	MarkMetricSegsRolledupByKeys(ctx context.Context, arg MarkMetricSegsRolledupByKeysParams) error
	MarkTraceSegsCompactedByKeys(ctx context.Context, arg MarkTraceSegsCompactedByKeysParams) error
	// Returns an estimate of the number of metric segments, accounting for per-file overhead.
	// Uses frequency_ms to provide more accurate estimates based on collection frequency.
	MetricSegEstimator(ctx context.Context, arg MetricSegEstimatorParams) ([]MetricSegEstimatorRow, error)
	MetricSegmentCleanupBatchDelete(ctx context.Context, arg []MetricSegmentCleanupBatchDeleteParams) *MetricSegmentCleanupBatchDeleteBatchResults
	MetricSegmentCleanupDelete(ctx context.Context, arg MetricSegmentCleanupDeleteParams) error
	MetricSegmentCleanupGet(ctx context.Context, arg MetricSegmentCleanupGetParams) ([]MetricSegmentCleanupGetRow, error)
	PubSubMessageHistoryCleanup(ctx context.Context, arg PubSubMessageHistoryCleanupParams) (pgconn.CommandTag, error)
	PubSubMessageHistoryCount(ctx context.Context) (int64, error)
	PubSubMessageHistoryGetRecentForBucket(ctx context.Context, arg PubSubMessageHistoryGetRecentForBucketParams) ([]PubsubMessageHistory, error)
	PubSubMessageHistoryInsert(ctx context.Context, arg PubSubMessageHistoryInsertParams) (pgconn.CommandTag, error)
	// Returns an estimate of the number of trace segments, accounting for per-file overhead.
	TraceSegEstimator(ctx context.Context, arg TraceSegEstimatorParams) ([]TraceSegEstimatorRow, error)
	TraceSegmentCleanupBatchDelete(ctx context.Context, arg []TraceSegmentCleanupBatchDeleteParams) *TraceSegmentCleanupBatchDeleteBatchResults
	TraceSegmentCleanupDelete(ctx context.Context, arg TraceSegmentCleanupDeleteParams) error
	TraceSegmentCleanupGet(ctx context.Context, arg TraceSegmentCleanupGetParams) ([]TraceSegmentCleanupGetRow, error)
	// Updates or inserts a single metric pack estimate (backward compatibility)
	UpsertMetricPackEstimate(ctx context.Context, arg UpsertMetricPackEstimateParams) error
	// Updates or inserts a single pack estimate for any signal type
	UpsertPackEstimate(ctx context.Context, arg UpsertPackEstimateParams) error
	UpsertServiceIdentifier(ctx context.Context, arg UpsertServiceIdentifierParams) (UpsertServiceIdentifierRow, error)
	batchInsertLogSegsDirect(ctx context.Context, arg []batchInsertLogSegsDirectParams) *batchInsertLogSegsDirectBatchResults
	batchInsertTraceSegsDirect(ctx context.Context, arg []batchInsertTraceSegsDirectParams) *batchInsertTraceSegsDirectBatchResults
	insertLogSegmentDirect(ctx context.Context, arg InsertLogSegmentParams) error
	insertMetricSegDirect(ctx context.Context, arg InsertMetricSegmentParams) error
	insertMetricSegsDirect(ctx context.Context, arg []InsertMetricSegsParams) *insertMetricSegsDirectBatchResults
	insertTraceSegmentDirect(ctx context.Context, arg InsertTraceSegmentParams) error
	markLogSegsCompactedUnpublishedByKeys(ctx context.Context, arg markLogSegsCompactedUnpublishedByKeysParams) error
	markMetricSegsCompactedUnpublishedByKeys(ctx context.Context, arg markMetricSegsCompactedUnpublishedByKeysParams) error
	markTraceSegsCompactedUnpublishedByKeys(ctx context.Context, arg markTraceSegsCompactedUnpublishedByKeysParams) error
}

var _ Querier = (*Queries)(nil)
