Versions in this module Expand all Collapse all v0 v0.0.1 Mar 2, 2026 Changes in this version + type ErrorCategory string + const ErrorCategoryExecution + const ErrorCategoryPermission + const ErrorCategorySyntax + const ErrorCategoryTimeout + const ErrorCategoryValidation + type MetadataStore struct + func NewMetadataStore(runtime *sqliteapp.Runtime) (*MetadataStore, error) + func (s *MetadataStore) CreateSavedQuery(ctx context.Context, req SavedQueryUpsertRequest) (*SavedQuery, error) + func (s *MetadataStore) DeleteSavedQuery(ctx context.Context, id string) error + func (s *MetadataStore) ListQueryHistory(ctx context.Context, limit, offset int, status string) ([]QueryHistoryEntry, int, error) + func (s *MetadataStore) ListSavedQueries(ctx context.Context) ([]SavedQuery, error) + func (s *MetadataStore) RecordQueryHistory(ctx context.Context, entry QueryHistoryEntry) error + func (s *MetadataStore) UpdateSavedQuery(ctx context.Context, id string, req SavedQueryUpsertRequest) (*SavedQuery, error) + type QueryAPIError struct + Category ErrorCategory + CorrelationID string + Message string + type QueryAuditEvent struct + Category string + CorrelationID string + DurationMS int64 + RowCount int + StatementType string + Status string + Truncated bool + type QueryColumn struct + DatabaseType string + Name string + Nullable *bool + ScanType string + type QueryErrorResponse struct + Error QueryAPIError + type QueryExecutionMeta struct + CorrelationID string + DurationMS int64 + EffectiveRowLimit int + PayloadBytes int + PayloadCapBytes int + RowCount int + StatementTimeoutMS int64 + StatementType string + Truncated bool + TruncatedByPayload bool + TruncatedByRowLimit bool + type QueryExecutionResult struct + Duration time.Duration + Response QueryResponse + StatementType string + TruncatedBytes bool + TruncatedRows bool + type QueryExecutor struct + func NewQueryExecutor(runtime *sqliteapp.Runtime, opts QueryExecutorOptions) (*QueryExecutor, error) + func (q *QueryExecutor) Execute(ctx context.Context, req QueryRequest, correlationID string) (*QueryExecutionResult, error) + type QueryExecutorOptions struct + EnableAuditLogEvents bool + MaxPayloadBytes int + RateLimitRequests int + RateLimitWindow time.Duration + RedactedColumns []string + StatementAllowlist []string + StatementDenylist []string + type QueryHandler struct + func NewQueryHandler(executor *QueryExecutor, store *MetadataStore, logger *log.Logger) (*QueryHandler, error) + func (h *QueryHandler) HandleHistory(w http.ResponseWriter, req *http.Request) + func (h *QueryHandler) HandleQuery(w http.ResponseWriter, req *http.Request) + func (h *QueryHandler) HandleSavedQueries(w http.ResponseWriter, req *http.Request) + func (h *QueryHandler) HandleSavedQueryByID(w http.ResponseWriter, req *http.Request) + type QueryHandlerOptions struct + EnableAuditLogEvents bool + RateLimitRequests int + RateLimitWindow time.Duration + type QueryHistoryEntry struct + CreatedAt string + DurationMS int64 + ErrorSummary string + ID string + ParamsJSON string + QueryPreview string + QueryText string + RowCount int + Status string + type QueryHistoryListResponse struct + Items []QueryHistoryEntry + Limit int + Offset int + Total int + type QueryRequest struct + AllowMultiStatement bool + NamedParams map[string]any + PositionalParams []any + RowLimit int + SQL string + TimeoutMS int + type QueryResponse struct + Columns []QueryColumn + Meta QueryExecutionMeta + Rows []map[string]any + type SavedQuery struct + CreatedAt string + ID string + Name string + NamedParams map[string]any + PositionalParams []any + SQL string + SchemaVersion int + UpdatedAt string + type SavedQueryListResponse struct + Items []SavedQuery + type SavedQueryUpsertRequest struct + Name string + NamedParams map[string]any + PositionalParams []any + SQL string + SchemaVersion int