redshiftdata

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 37 Imported by: 0

README

Redshift Data

Parity grade: A · SDK aws-sdk-go-v2/service/redshiftdata@v1.43.4 · last audited 2026-10-10 (d522d763f)

Coverage

Metric Value
PARITY entries audited 12 (8 ok, 4 gap)
Feature families 3 (3 ok)
Known gaps none
Structural gaps (can't be emulated) 4
Deferred items 1
Resource leaks clean
Structural gaps

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • Without a live cluster engine (--redshift-engine=docker) statements settle on a timer and result rows are a fixed placeholder; QueryTimeout/ActiveStatementsExceeded-style faults cannot occur. Serverless workgroups never have an engine.
  • Engine-backed statements log in as the cluster master user, ignoring DbUser/SecretArn/temporary credentials; results are one page (no NextToken); SQL runs on Postgres, so Redshift-only syntax fails. Unverified against a real cluster: NUMERIC is returned as stringValue, DDL/DML report ResultRows -1, and sub-statement ids are <id>:<n>.
  • DescribeStatement.RedshiftPid and ExecuteStatement/BatchExecuteStatement.DbGroups are engine/credential-sourced values (real backend pid, GetClusterCredentials groups); no engine or credential model exists.
  • ActiveStatementsExceeded/ActiveSessionsExceeded/ActiveWaitingRequestsExceeded/DatabaseConnection/QueryTimeout/ExecuteStatement/BatchExecuteStatement exceptions need a real cluster, concurrency limit or wait queue.
Deferred
  • none

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a statement does not exist.
	ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrTerminalState is returned when cancelling a statement that is already in a terminal state.
	ErrTerminalState = awserr.New("ValidationException", awserr.ErrConflict)
	// ErrValidation is returned when input validation fails.
	ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter)
	// ErrNoResultSet is returned when fetching results for a statement with no result set.
	ErrNoResultSet = awserr.New("ValidationException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("nil AppContext passed to RedshiftData Provider.Init")

ErrNilAppContext is returned by Init when a nil AppContext is passed.

Functions

func BindNamedParameters

func BindNamedParameters(stmt string, params []SQLParameter) (string, []any, error)

BindNamedParameters rewrites :name placeholders to positional $n arguments; quoted text, comments and :: casts are left alone.

func ValidateConnectionTarget

func ValidateConnectionTarget(clusterIdentifier, workgroupName string) error

ValidateConnectionTarget verifies that exactly one of clusterIdentifier or workgroupName is provided, matching the AWS constraint.

func ValidateListSessionsRequest added in v1.2.0

func ValidateListSessionsRequest(sessionID, status, clusterIdentifier, workgroupName, database string) error

ValidateListSessionsRequest enforces the mutual-exclusivity constraints documented on ListSessionsInput (aws-sdk-go-v2/service/redshiftdata's api_op_ListSessions.go): SessionId can't be combined with Status/ClusterIdentifier/WorkgroupName/Database, and ClusterIdentifier/WorkgroupName can't both be set.

func ValidateListStatementsConnectionTarget

func ValidateListStatementsConnectionTarget(clusterIdentifier, workgroupName string) error

ValidateListStatementsConnectionTarget enforces the mutual-exclusivity constraint documented on ListStatementsInput.ClusterIdentifier / .WorkgroupName (aws-sdk-go-v2/service/redshiftdata@v1.43.4's api_op_ListStatements.go: "When providing ClusterIdentifier, then WorkgroupName can't be specified" and the mirrored sentence on WorkgroupName). Unlike ExecuteStatement/ BatchExecuteStatement (ValidateConnectionTarget), neither field is required here: ListStatements' own doc comment only requires one "when you use identity-enhanced role sessions," so specifying neither must still list across all targets, matching the identical precedent in ValidateListSessionsRequest.

func ValidateListStatementsStatus

func ValidateListStatementsStatus(status string) error

ValidateListStatementsStatus returns ErrValidation if status is not a known value. An empty string is also accepted (matches FINISHED per AWS default).

Types

type ClusterEngines

type ClusterEngines interface {
	EngineLogin(region, clusterID string) (EngineLogin, bool)
}

ClusterEngines resolves the live SQL engine behind a provisioned cluster, if any.

type ColumnMetadata

type ColumnMetadata struct {
	Name            string `json:"name"`
	Label           string `json:"label"`
	TypeName        string `json:"typeName"`
	SchemaName      string `json:"schemaName"`
	TableName       string `json:"tableName"`
	Length          int32  `json:"length"`
	Nullable        int32  `json:"nullable"`
	Precision       int32  `json:"precision"`
	Scale           int32  `json:"scale"`
	IsCaseSensitive bool   `json:"isCaseSensitive"`
	IsCurrency      bool   `json:"isCurrency"`
	IsSigned        bool   `json:"isSigned"`
}

ColumnMetadata describes one result column (types.ColumnMetadata).

type ConfigProvider

type ConfigProvider interface {
	GetRedshiftDataSettings() Settings
}

ConfigProvider is a private interface to extract Redshift Data configuration from the abstract AppContext Config.

type EngineLogin

type EngineLogin struct {
	Addr     string
	User     string
	Password string
	DBName   string
}

EngineLogin identifies the master login of a cluster's live SQL engine.

type Field

type Field struct {
	BooleanValue *bool    `json:"booleanValue,omitempty"`
	DoubleValue  *float64 `json:"doubleValue,omitempty"`
	LongValue    *int64   `json:"longValue,omitempty"`
	StringValue  *string  `json:"stringValue,omitempty"`
	BlobValue    *string  `json:"blobValue,omitempty"`
	IsNull       bool     `json:"isNull,omitempty"`
}

Field is a Redshift Data API record value (types.Field): exactly one member is set.

func FieldFromValue

func FieldFromValue(dbType string, v any) Field

FieldFromValue maps a database/sql scanned value of a Postgres column type to a Data API Field.

type Handler

type Handler struct {
	Backend StorageBackend

	AccountID string
	Region    string
	// contains filtered or unexported fields
}

Handler is the HTTP handler for the AWS Redshift Data API.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Redshift Data handler.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this handler handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the operation name from the X-Amz-Target header.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the statement ID from the request body.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported Redshift Data operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for Redshift Data requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state. Useful for test isolation.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches Redshift Data API requests. Requests are identified by the X-Amz-Target header prefix "RedshiftData.".

func (*Handler) SetClusterEngines

func (h *Handler) SetClusterEngines(e ClusterEngines)

SetClusterEngines wires the live cluster engine lookup into the Data API backend.

func (*Handler) SetObjectStore

func (h *Handler) SetObjectStore(s ObjectStore)

SetObjectStore wires the S3 behind COPY and UNLOAD into the Data API backend.

func (*Handler) SetWorkgroupEngines

func (h *Handler) SetWorkgroupEngines(e WorkgroupEngines)

SetWorkgroupEngines wires the live workgroup engine lookup into the Data API backend.

func (*Handler) SetWorkgroupResolver

func (h *Handler) SetWorkgroupResolver(r WorkgroupResolver)

SetWorkgroupResolver wires the Redshift Serverless lookup used to validate WorkgroupName.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend. Before this, Handler had no Snapshot/Restore of its own, so redshiftdata was silently excluded from Gopherstack's persistence.Manager (it type- asserts each service's Registerable to persistence.Persistable) even though InMemoryBackend fully implemented both methods -- a dead-wiring bug fixed as part of the Phase 3.3 rollout.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker starts the background janitor if configured.

func (*Handler) WithJanitor

func (h *Handler) WithJanitor(interval, statementTTL time.Duration, taskTimeout ...time.Duration) *Handler

WithJanitor attaches a background janitor to the handler. If the backend is not an *InMemoryBackend, this is a no-op.

type InMemoryBackend

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

InMemoryBackend is an in-memory store for Redshift Data API statements. All regional resource maps are nested by region (outer key = region) so that the same-named statement in two regions are fully isolated.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory Redshift Data backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the AWS account ID this backend is configured for.

func (*InMemoryBackend) BatchExecuteStatement

func (b *InMemoryBackend) BatchExecuteStatement(
	ctx context.Context,
	sqls []string, clusterIdentifier, workgroupName, database, dbUser, secretARN, statementName string,
	withEvent bool, resultFormat string,
	parameters []SQLParameter,
	sessionID, executionMode string,
) (*Statement, error)

BatchExecuteStatement creates and immediately completes a batch SQL statement.

func (*InMemoryBackend) CancelStatement

func (b *InMemoryBackend) CancelStatement(ctx context.Context, id string) error

CancelStatement marks a statement as aborted.

func (*InMemoryBackend) DescribeStatement

func (b *InMemoryBackend) DescribeStatement(ctx context.Context, id string) (*Statement, error)

DescribeStatement returns the details of a statement by ID.

func (*InMemoryBackend) EngineResult

func (b *InMemoryBackend) EngineResult(ctx context.Context, id string) (*ResultSet, bool, error)

EngineResult returns the stored result set of an engine-run statement or batch sub-statement. found is false when id is not an engine-run statement, so callers fall back to the default result.

func (*InMemoryBackend) EvictExpiredStatements

func (b *InMemoryBackend) EvictExpiredStatements(cutoff time.Time) int

EvictExpiredStatements removes terminal statements whose UpdatedAt is older than the given cutoff across all regions. Returns the number of evicted statements. Only terminal states (FINISHED, FAILED, ABORTED) are eligible for eviction.

func (*InMemoryBackend) ExecuteStatement

func (b *InMemoryBackend) ExecuteStatement(
	ctx context.Context,
	sql, clusterIdentifier, workgroupName, database, dbUser, secretARN, statementName string,
	withEvent bool, resultFormat string,
	parameters []SQLParameter,
	sessionID string,
) (*Statement, error)

ExecuteStatement creates and immediately completes a SQL statement.

Database is NOT validated as required here: unlike ListDatabasesInput/ ListSchemasInput/ListTablesInput/DescribeTableInput (whose Database member carries "This member is required" and a matching client-side smithy.NewErrParamRequired check in validators.go), ExecuteStatementInput's Database doc comment says only "required when authenticating using either Secrets Manager or temporary credentials" -- a conditional, not a hard trait -- and validateOpExecuteStatementInput has no Database check at all.

func (*InMemoryBackend) ListSessions added in v1.2.0

func (b *InMemoryBackend) ListSessions(
	ctx context.Context,
	filter ListSessionsFilter,
) ([]*SessionData, string, error)

ListSessions returns a page of sessions derived from stored statements that share a non-empty SessionID (see groupSessions), sorted newest-first by CreatedAt to match ListStatements' ordering convention.

func (*InMemoryBackend) ListStatements

func (b *InMemoryBackend) ListStatements(
	ctx context.Context,
	filter ListStatementsFilter,
) ([]*Statement, string, error)

ListStatements returns statements sorted by creation time (newest first). An omitted Status matches AWS by returning only finished statements. Returns the page slice and a next-token string (non-empty when more pages exist).

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored statements across all regions.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.

func (*InMemoryBackend) SetClusterEngines

func (b *InMemoryBackend) SetClusterEngines(e ClusterEngines)

SetClusterEngines wires the lookup of live cluster engines; statements against such clusters run real SQL.

func (*InMemoryBackend) SetLifecycleDelay

func (b *InMemoryBackend) SetLifecycleDelay(d time.Duration)

SetLifecycleDelay sets how long a statement takes to run; zero (default) finishes it instantly.

func (*InMemoryBackend) SetObjectStore

func (b *InMemoryBackend) SetObjectStore(s ObjectStore)

SetObjectStore wires the S3 that COPY FROM 's3://...' and UNLOAD TO 's3://...' read and write.

func (*InMemoryBackend) SetSQLExecutor

func (b *InMemoryBackend) SetSQLExecutor(x SQLExecutor)

SetSQLExecutor replaces the executor that runs SQL against live engines (default: Postgres wire).

func (*InMemoryBackend) SetStatementSessionKeepAlive

func (b *InMemoryBackend) SetStatementSessionKeepAlive(ctx context.Context, id string, seconds int32)

SetStatementSessionKeepAlive records the SessionKeepAliveSeconds a request supplied on the statement it created, so its session can expire.

func (*InMemoryBackend) SetWorkgroupEngines

func (b *InMemoryBackend) SetWorkgroupEngines(e WorkgroupEngines)

SetWorkgroupEngines wires the lookup of live workgroup engines; statements against such workgroups run real SQL.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serializes the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) WaitForStatement

func (b *InMemoryBackend) WaitForStatement(
	ctx context.Context, id string, wait time.Duration,
) (*Statement, error)

WaitForStatement blocks until the statement leaves SUBMITTED/PICKED/STARTED, wait elapses, or ctx ends.

type Janitor

type Janitor struct {
	Backend      *InMemoryBackend
	Interval     time.Duration
	StatementTTL time.Duration
	// TaskTimeout bounds each individual sweep task. When zero, each task runs
	// without a deadline. When non-zero, a child context with this timeout is
	// created for each sweep pass, preventing a stalled operation from blocking
	// the janitor loop indefinitely.
	TaskTimeout time.Duration
}

Janitor is the Redshift Data background worker that evicts completed statements after a configurable TTL to prevent unbounded growth of in-memory state. It complements the ring-buffer cap: the ring buffer evicts by count, the janitor evicts by age.

func NewJanitor

func NewJanitor(backend *InMemoryBackend, interval, statementTTL time.Duration) *Janitor

NewJanitor creates a new Janitor for the given backend. Zero values for interval or statementTTL fall back to package defaults.

func (*Janitor) Run

func (j *Janitor) Run(ctx context.Context)

Run runs the janitor loop until ctx is cancelled. It should be started in a goroutine: go janitor.Run(ctx).

func (*Janitor) SweepOnce

func (j *Janitor) SweepOnce(ctx context.Context)

SweepOnce runs a single sweep pass. Exposed for testing.

type ListSessionsFilter added in v1.2.0

type ListSessionsFilter struct {
	RoleLevel         *bool
	ClusterIdentifier string
	WorkgroupName     string
	Database          string
	SessionID         string
	Status            string
	NextToken         string
	MaxResults        int
}

ListSessionsFilter controls session filtering and pagination.

type ListStatementsFilter

type ListStatementsFilter struct {
	RoleLevel         *bool
	ClusterIdentifier string
	WorkgroupName     string
	Database          string
	StatementName     string
	Status            string
	NextToken         string
	MaxResults        int
}

ListStatementsFilter controls statement filtering and pagination.

type ObjectStore

type ObjectStore interface {
	GetObject(ctx context.Context, bucket, key string) ([]byte, error)
	PutObject(ctx context.Context, bucket, key string, body []byte) error
	DeleteObject(ctx context.Context, bucket, key string) error
	// ListKeys returns every key under prefix in ascending order.
	ListKeys(ctx context.Context, bucket, prefix string) ([]string, error)
}

ObjectStore is the S3 surface COPY FROM and UNLOAD TO run against; the emulator's S3 backs it.

type Provider

type Provider struct{}

Provider implements service.Provider for AWS Redshift Data.

func (*Provider) Init

Init initializes the Redshift Data service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type ResultSet

type ResultSet struct {
	Columns []ColumnMetadata
	Rows    [][]Field
}

ResultSet is the rows and columns one statement returned.

type SQLExecutor

type SQLExecutor interface {
	ExecuteSQL(ctx context.Context, login EngineLogin, sqls []string, params []SQLParameter, atomic bool) []SQLOutcome
}

SQLExecutor runs SQL against a live engine. It returns one outcome per statement attempted and stops after the first failure; atomic runs the statements in a single transaction.

func NewPGXExecutor

func NewPGXExecutor() SQLExecutor

NewPGXExecutor returns an SQLExecutor that speaks the Postgres wire protocol.

type SQLOutcome

type SQLOutcome struct {
	Err    error
	Result *ResultSet
}

SQLOutcome is the result of one SQL statement; Result is nil for statements without a result set.

type SQLParameter

type SQLParameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

SQLParameter is a named SQL parameter for use in parameterized queries, matching the SQLParameter type in the AWS Redshift Data API.

type SessionData added in v1.2.0

type SessionData struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	TTL       time.Time `json:"ttl"`

	SessionID          string `json:"sessionId"`
	ClusterIdentifier  string `json:"clusterIdentifier,omitempty"`
	WorkgroupName      string `json:"workgroupName,omitempty"`
	Database           string `json:"database,omitempty"`
	DBUser             string `json:"dbUser,omitempty"`
	Status             string `json:"status"`
	CurrentStatementID string `json:"-"`
	AliveSeconds       int32  `json:"aliveSeconds,omitempty"`
	// contains filtered or unexported fields
}

SessionData is a ListSessions item, derived by grouping stored statements that share a SessionID (see groupSessions). TTL is the earlier of the keep-alive expiry and the 24h forced close; the session is CLOSED once TTL has passed.

type Settings

type Settings struct {
	JanitorInterval time.Duration `json:"janitor_interval" env:"REDSHIFTDATA_JANITOR_INTERVAL" default:"1m"  help:"Janitor tick interval."` //nolint:lll // Kong struct tag makes this line long
	StatementTTL    time.Duration ``                                                                                                        //nolint:lll // Kong struct tag makes this line long
	/* 134-byte string literal not displayed */
}

Settings holds service-level configuration for the Redshift Data backend. Fields are picked up by the Kong CLI parser when this struct is embedded in the root CLI command.

type Statement

type Statement struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`

	ID                      string             `json:"id"`
	SessionID               string             `json:"sessionID,omitempty"`
	WorkgroupName           string             `json:"workgroupName"`
	QueryString             string             `json:"queryString"`
	DBUser                  string             `json:"dbUser"`
	SecretARN               string             `json:"secretARN"`
	StatementName           string             `json:"statementName"`
	ResultFormat            string             `json:"resultFormat"`
	Owner                   string             `json:"owner,omitempty"`
	OwnerSession            string             `json:"ownerSession,omitempty"`
	ExecutionMode           string             `json:"executionMode,omitempty"`
	Error                   string             `json:"error"`
	Database                string             `json:"database"`
	ClusterIdentifier       string             `json:"clusterIdentifier"`
	Status                  string             `json:"status"`
	SubStatements           []SubStatementData `json:"subStatements,omitempty"`
	QueryStrings            []string           `json:"queryStrings"`
	Parameters              []SQLParameter     `json:"parameters,omitempty"`
	DurationMs              int64              `json:"durationMs"`
	ResultRows              int64              `json:"resultRows"`
	ResultSize              int64              `json:"resultSize"`
	SessionKeepAliveSeconds int32              `json:"sessionKeepAliveSeconds,omitempty"`
	HasResultSet            bool               `json:"hasResultSet"`
	IsBatchStatement        bool               `json:"isBatchStatement"`
	WithEvent               bool               `json:"withEvent"`
	EngineBacked            bool               `json:"engineBacked,omitempty"`
	// contains filtered or unexported fields
}

Statement represents an AWS Redshift Data API SQL statement.

type StorageBackend

type StorageBackend interface {
	// Statement execution
	ExecuteStatement(
		ctx context.Context,
		sql, clusterIdentifier, workgroupName, database, dbUser, secretARN, statementName string,
		withEvent bool, resultFormat string,
		parameters []SQLParameter,
		sessionID string,
	) (*Statement, error)
	BatchExecuteStatement(
		ctx context.Context,
		sqls []string, clusterIdentifier, workgroupName, database, dbUser, secretARN, statementName string,
		withEvent bool, resultFormat string,
		parameters []SQLParameter,
		sessionID, executionMode string,
	) (*Statement, error)

	// Statement inspection
	DescribeStatement(ctx context.Context, id string) (*Statement, error)
	// EngineResult returns the result set of a statement run on a live engine; found is false otherwise.
	EngineResult(ctx context.Context, id string) (rs *ResultSet, found bool, err error)
	WaitForStatement(ctx context.Context, id string, wait time.Duration) (*Statement, error)
	CancelStatement(ctx context.Context, id string) error
	// ListStatements returns a page of statements and a next-token for pagination.
	ListStatements(ctx context.Context, filter ListStatementsFilter) (
		[]*Statement, string, error,
	)

	// Sessions
	SetStatementSessionKeepAlive(ctx context.Context, id string, seconds int32)
	// ListSessions returns a page of sessions -- derived from stored statements
	// that share a SessionID, not a separately stored resource -- and a
	// next-token for pagination.
	ListSessions(ctx context.Context, filter ListSessionsFilter) (
		[]*SessionData, string, error,
	)

	// Maintenance
	// EvictExpiredStatements removes terminal statements older than cutoff.
	// Returns the number of evicted statements.
	EvictExpiredStatements(cutoff time.Time) int

	// Lifecycle
	Reset()
	Region() string
	AccountID() string
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend defines the interface for Redshift Data backend implementations. All methods must be safe for concurrent use.

type SubStatementData

type SubStatementData struct {
	ID           string    `json:"id"`
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
	QueryString  string    `json:"queryString"`
	Status       string    `json:"status"`
	Error        string    `json:"error"`
	HasResultSet bool      `json:"hasResultSet"`
	ResultRows   int64     `json:"resultRows"`
	ResultSize   int64     `json:"resultSize"`
	DurationMs   int64     `json:"durationMs"`
}

SubStatementData represents a single sub-statement within a batch, matching the SubStatementData shape returned by AWS DescribeStatement for batch runs.

type WorkgroupEngines

type WorkgroupEngines interface {
	WorkgroupEngineLogin(region, name string) (EngineLogin, bool)
}

WorkgroupEngines resolves the live SQL engine behind a Redshift Serverless workgroup, if any.

type WorkgroupResolver

type WorkgroupResolver interface {
	WorkgroupStatus(region, name string) (status string, found bool)
}

WorkgroupResolver looks up a Redshift Serverless workgroup's status in a region.

Jump to

Keyboard shortcuts

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