s4wave_sql_query_result

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const SRPCSqlQueryResultResourceServiceServiceID = "s4wave.sql.query_result.SqlQueryResultResourceService"
View Source
const SqlQueryResultTypeID = "sql/query-result"

SqlQueryResultTypeID is the world ObjectType id for SQL query results.

Variables

This section is empty.

Functions

func NewQueryResultBlock

func NewQueryResultBlock() block.Block

NewQueryResultBlock constructs a SQL query result block.

func NewSRPCSqlQueryResultResourceServiceHandler

func NewSRPCSqlQueryResultResourceServiceHandler(impl SRPCSqlQueryResultResourceServiceServer, serviceID string) srpc.Handler

NewSRPCSqlQueryResultResourceServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: s4wave.sql.query_result.SqlQueryResultResourceService

func SRPCRegisterSqlQueryResultResourceService

func SRPCRegisterSqlQueryResultResourceService(mux srpc.Mux, impl SRPCSqlQueryResultResourceServiceServer) error

SRPCRegisterSqlQueryResultResourceService registers the implementation with the mux. Uses the default serviceID: s4wave.sql.query_result.SqlQueryResultResourceService

func SyncResultGraphQuads

func SyncResultGraphQuads(ctx context.Context, ws world.WorldState, objectKey string) error

SyncResultGraphQuads replaces the result's source query and target database graph links.

func WriteQueryResultRootRef

func WriteQueryResultRootRef(
	ctx context.Context,
	ws world.WorldState,
	result *QueryResult,
) (*bucket.ObjectRef, error)

WriteQueryResultRootRef writes a SQL query result root block and returns its ref.

Types

type GetResultGridRequest

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

GetResultGridRequest is a request for the result grid.

func (*GetResultGridRequest) CloneMessageVT

func (*GetResultGridRequest) CloneVT

func (*GetResultGridRequest) EqualMessageVT

func (this *GetResultGridRequest) EqualMessageVT(thatMsg any) bool

func (*GetResultGridRequest) EqualVT

func (this *GetResultGridRequest) EqualVT(that *GetResultGridRequest) bool

func (*GetResultGridRequest) MarshalJSON

func (x *GetResultGridRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the GetResultGridRequest to JSON.

func (*GetResultGridRequest) MarshalProtoJSON

func (x *GetResultGridRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the GetResultGridRequest message to JSON.

func (*GetResultGridRequest) MarshalProtoText

func (x *GetResultGridRequest) MarshalProtoText() string

func (*GetResultGridRequest) MarshalToSizedBufferVT

func (m *GetResultGridRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*GetResultGridRequest) MarshalToVT

func (m *GetResultGridRequest) MarshalToVT(dAtA []byte) (int, error)

func (*GetResultGridRequest) MarshalVT

func (m *GetResultGridRequest) MarshalVT() (dAtA []byte, err error)

func (*GetResultGridRequest) ProtoMessage

func (*GetResultGridRequest) ProtoMessage()

func (*GetResultGridRequest) Reset

func (x *GetResultGridRequest) Reset()

func (*GetResultGridRequest) SizeVT

func (m *GetResultGridRequest) SizeVT() (n int)

func (*GetResultGridRequest) String

func (x *GetResultGridRequest) String() string

func (*GetResultGridRequest) UnmarshalJSON

func (x *GetResultGridRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the GetResultGridRequest from JSON.

func (*GetResultGridRequest) UnmarshalProtoJSON

func (x *GetResultGridRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the GetResultGridRequest message from JSON.

func (*GetResultGridRequest) UnmarshalVT

func (m *GetResultGridRequest) UnmarshalVT(dAtA []byte) error

type GetResultGridResponse

type GetResultGridResponse struct {

	// Columns describes the returned result columns.
	Columns []*sql.ColumnSchema `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"`
	// RowBatches stores returned rows in column order.
	RowBatches []*sql.RowBatch `protobuf:"bytes,2,rep,name=row_batches,json=rowBatches,proto3" json:"rowBatches,omitempty"`
	// ExecutedAt is the execution timestamp.
	ExecutedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executedAt,omitempty"`
	// Truncated indicates rows were omitted by the run row limit.
	Truncated bool `protobuf:"varint,4,opt,name=truncated,proto3" json:"truncated,omitempty"`
	// Error records an execution error when no rows were returned.
	Error *QueryResultError `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// SourceQueryObjectKey is the sql/query object that produced this result.
	SourceQueryObjectKey string `protobuf:"bytes,6,opt,name=source_query_object_key,json=sourceQueryObjectKey,proto3" json:"sourceQueryObjectKey,omitempty"`
	// TargetDbObjectKey is the sql/db object used for execution.
	TargetDbObjectKey string `protobuf:"bytes,7,opt,name=target_db_object_key,json=targetDbObjectKey,proto3" json:"targetDbObjectKey,omitempty"`
	// RowCount is the number of persisted rows.
	RowCount uint64 `protobuf:"varint,8,opt,name=row_count,json=rowCount,proto3" json:"rowCount,omitempty"`
	// contains filtered or unexported fields
}

GetResultGridResponse returns the persisted result grid.

func (*GetResultGridResponse) CloneMessageVT

func (*GetResultGridResponse) CloneVT

func (*GetResultGridResponse) EqualMessageVT

func (this *GetResultGridResponse) EqualMessageVT(thatMsg any) bool

func (*GetResultGridResponse) EqualVT

func (this *GetResultGridResponse) EqualVT(that *GetResultGridResponse) bool

func (*GetResultGridResponse) GetColumns

func (x *GetResultGridResponse) GetColumns() []*sql.ColumnSchema

func (*GetResultGridResponse) GetError

func (x *GetResultGridResponse) GetError() *QueryResultError

func (*GetResultGridResponse) GetExecutedAt

func (x *GetResultGridResponse) GetExecutedAt() *timestamppb.Timestamp

func (*GetResultGridResponse) GetRowBatches

func (x *GetResultGridResponse) GetRowBatches() []*sql.RowBatch

func (*GetResultGridResponse) GetRowCount

func (x *GetResultGridResponse) GetRowCount() uint64

func (*GetResultGridResponse) GetSourceQueryObjectKey

func (x *GetResultGridResponse) GetSourceQueryObjectKey() string

func (*GetResultGridResponse) GetTargetDbObjectKey

func (x *GetResultGridResponse) GetTargetDbObjectKey() string

func (*GetResultGridResponse) GetTruncated

func (x *GetResultGridResponse) GetTruncated() bool

func (*GetResultGridResponse) MarshalJSON

func (x *GetResultGridResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the GetResultGridResponse to JSON.

func (*GetResultGridResponse) MarshalProtoJSON

func (x *GetResultGridResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the GetResultGridResponse message to JSON.

func (*GetResultGridResponse) MarshalProtoText

func (x *GetResultGridResponse) MarshalProtoText() string

func (*GetResultGridResponse) MarshalToSizedBufferVT

func (m *GetResultGridResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*GetResultGridResponse) MarshalToVT

func (m *GetResultGridResponse) MarshalToVT(dAtA []byte) (int, error)

func (*GetResultGridResponse) MarshalVT

func (m *GetResultGridResponse) MarshalVT() (dAtA []byte, err error)

func (*GetResultGridResponse) ProtoMessage

func (*GetResultGridResponse) ProtoMessage()

func (*GetResultGridResponse) Reset

func (x *GetResultGridResponse) Reset()

func (*GetResultGridResponse) SizeVT

func (m *GetResultGridResponse) SizeVT() (n int)

func (*GetResultGridResponse) String

func (x *GetResultGridResponse) String() string

func (*GetResultGridResponse) UnmarshalJSON

func (x *GetResultGridResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the GetResultGridResponse from JSON.

func (*GetResultGridResponse) UnmarshalProtoJSON

func (x *GetResultGridResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the GetResultGridResponse message from JSON.

func (*GetResultGridResponse) UnmarshalVT

func (m *GetResultGridResponse) UnmarshalVT(dAtA []byte) error

type QueryResult

type QueryResult struct {

	// Columns describes the returned result columns.
	Columns []*sql.ColumnSchema `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"`
	// RowBatches stores returned rows in column order.
	RowBatches []*sql.RowBatch `protobuf:"bytes,2,rep,name=row_batches,json=rowBatches,proto3" json:"rowBatches,omitempty"`
	// ExecutedAt is the execution timestamp.
	ExecutedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executedAt,omitempty"`
	// Truncated indicates rows were omitted by the run row limit.
	Truncated bool `protobuf:"varint,4,opt,name=truncated,proto3" json:"truncated,omitempty"`
	// Error records an execution error when no rows were returned.
	Error *QueryResultError `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// SourceQueryObjectKey is the sql/query object that produced this result.
	SourceQueryObjectKey string `protobuf:"bytes,6,opt,name=source_query_object_key,json=sourceQueryObjectKey,proto3" json:"sourceQueryObjectKey,omitempty"`
	// TargetDbObjectKey is the sql/db object used for execution.
	TargetDbObjectKey string `protobuf:"bytes,7,opt,name=target_db_object_key,json=targetDbObjectKey,proto3" json:"targetDbObjectKey,omitempty"`
	// RowCount is the number of persisted rows.
	RowCount uint64 `protobuf:"varint,8,opt,name=row_count,json=rowCount,proto3" json:"rowCount,omitempty"`
	// contains filtered or unexported fields
}

QueryResult is a standalone SQL query execution result world object.

func ReadQueryResultObjectRoot

func ReadQueryResultObjectRoot(ctx context.Context, obj world.ObjectState) (*QueryResult, error)

ReadQueryResultObjectRoot reads a SQL query result root from an object state.

func ReadQueryResultRoot

func ReadQueryResultRoot(ctx context.Context, ws world.WorldState, objectKey string) (*QueryResult, error)

ReadQueryResultRoot reads a SQL query result object's root.

func (*QueryResult) CloneMessageVT

func (m *QueryResult) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*QueryResult) CloneVT

func (m *QueryResult) CloneVT() *QueryResult

func (*QueryResult) EqualMessageVT

func (this *QueryResult) EqualMessageVT(thatMsg any) bool

func (*QueryResult) EqualVT

func (this *QueryResult) EqualVT(that *QueryResult) bool

func (*QueryResult) GetColumns

func (x *QueryResult) GetColumns() []*sql.ColumnSchema

func (*QueryResult) GetError

func (x *QueryResult) GetError() *QueryResultError

func (*QueryResult) GetExecutedAt

func (x *QueryResult) GetExecutedAt() *timestamppb.Timestamp

func (*QueryResult) GetRowBatches

func (x *QueryResult) GetRowBatches() []*sql.RowBatch

func (*QueryResult) GetRowCount

func (x *QueryResult) GetRowCount() uint64

func (*QueryResult) GetSourceQueryObjectKey

func (x *QueryResult) GetSourceQueryObjectKey() string

func (*QueryResult) GetTargetDbObjectKey

func (x *QueryResult) GetTargetDbObjectKey() string

func (*QueryResult) GetTruncated

func (x *QueryResult) GetTruncated() bool

func (*QueryResult) MarshalBlock

func (r *QueryResult) MarshalBlock() ([]byte, error)

MarshalBlock marshals the SQL query result root.

func (*QueryResult) MarshalJSON

func (x *QueryResult) MarshalJSON() ([]byte, error)

MarshalJSON marshals the QueryResult to JSON.

func (*QueryResult) MarshalProtoJSON

func (x *QueryResult) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the QueryResult message to JSON.

func (*QueryResult) MarshalProtoText

func (x *QueryResult) MarshalProtoText() string

func (*QueryResult) MarshalToSizedBufferVT

func (m *QueryResult) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResult) MarshalToVT

func (m *QueryResult) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResult) MarshalVT

func (m *QueryResult) MarshalVT() (dAtA []byte, err error)

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) Reset

func (x *QueryResult) Reset()

func (*QueryResult) SizeVT

func (m *QueryResult) SizeVT() (n int)

func (*QueryResult) String

func (x *QueryResult) String() string

func (*QueryResult) UnmarshalBlock

func (r *QueryResult) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the SQL query result root.

func (*QueryResult) UnmarshalJSON

func (x *QueryResult) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the QueryResult from JSON.

func (*QueryResult) UnmarshalProtoJSON

func (x *QueryResult) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the QueryResult message from JSON.

func (*QueryResult) UnmarshalVT

func (m *QueryResult) UnmarshalVT(dAtA []byte) error

func (*QueryResult) Validate

func (r *QueryResult) Validate() error

Validate performs cursory checks on the SQL query result root.

type QueryResultError

type QueryResultError struct {

	// Message is the execution error text.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

QueryResultError captures a SQL execution error.

func (*QueryResultError) CloneMessageVT

func (m *QueryResultError) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*QueryResultError) CloneVT

func (m *QueryResultError) CloneVT() *QueryResultError

func (*QueryResultError) EqualMessageVT

func (this *QueryResultError) EqualMessageVT(thatMsg any) bool

func (*QueryResultError) EqualVT

func (this *QueryResultError) EqualVT(that *QueryResultError) bool

func (*QueryResultError) GetMessage

func (x *QueryResultError) GetMessage() string

func (*QueryResultError) MarshalJSON

func (x *QueryResultError) MarshalJSON() ([]byte, error)

MarshalJSON marshals the QueryResultError to JSON.

func (*QueryResultError) MarshalProtoJSON

func (x *QueryResultError) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the QueryResultError message to JSON.

func (*QueryResultError) MarshalProtoText

func (x *QueryResultError) MarshalProtoText() string

func (*QueryResultError) MarshalToSizedBufferVT

func (m *QueryResultError) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResultError) MarshalToVT

func (m *QueryResultError) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResultError) MarshalVT

func (m *QueryResultError) MarshalVT() (dAtA []byte, err error)

func (*QueryResultError) ProtoMessage

func (*QueryResultError) ProtoMessage()

func (*QueryResultError) Reset

func (x *QueryResultError) Reset()

func (*QueryResultError) SizeVT

func (m *QueryResultError) SizeVT() (n int)

func (*QueryResultError) String

func (x *QueryResultError) String() string

func (*QueryResultError) UnmarshalJSON

func (x *QueryResultError) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the QueryResultError from JSON.

func (*QueryResultError) UnmarshalProtoJSON

func (x *QueryResultError) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the QueryResultError message from JSON.

func (*QueryResultError) UnmarshalVT

func (m *QueryResultError) UnmarshalVT(dAtA []byte) error

type SRPCSqlQueryResultResourceServiceClient

type SRPCSqlQueryResultResourceServiceClient interface {
	// SRPCClient returns the underlying SRPC client.
	SRPCClient() srpc.Client

	// GetResultGrid returns the persisted result grid.
	GetResultGrid(ctx context.Context, in *GetResultGridRequest) (*GetResultGridResponse, error)
}

func NewSRPCSqlQueryResultResourceServiceClient

func NewSRPCSqlQueryResultResourceServiceClient(cc srpc.Client) SRPCSqlQueryResultResourceServiceClient

func NewSRPCSqlQueryResultResourceServiceClientWithServiceID

func NewSRPCSqlQueryResultResourceServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCSqlQueryResultResourceServiceClient

type SRPCSqlQueryResultResourceServiceHandler

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

func (SRPCSqlQueryResultResourceServiceHandler) GetMethodIDs

func (*SRPCSqlQueryResultResourceServiceHandler) GetServiceID

func (*SRPCSqlQueryResultResourceServiceHandler) InvokeMethod

func (d *SRPCSqlQueryResultResourceServiceHandler) InvokeMethod(
	serviceID, methodID string,
	strm srpc.Stream,
) (bool, error)

func (SRPCSqlQueryResultResourceServiceHandler) InvokeMethod_GetResultGrid

type SRPCSqlQueryResultResourceServiceServer

type SRPCSqlQueryResultResourceServiceServer interface {
	// GetResultGrid returns the persisted result grid.
	GetResultGrid(context.Context, *GetResultGridRequest) (*GetResultGridResponse, error)
}

type SRPCSqlQueryResultResourceService_GetResultGridStream

type SRPCSqlQueryResultResourceService_GetResultGridStream interface {
	srpc.Stream
}

type SqlQueryResultResource

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

SqlQueryResultResource serves SqlQueryResultResourceService for one result object.

func NewSqlQueryResultResource

func NewSqlQueryResultResource(
	ws world.WorldState,
	objectKey string,
) *SqlQueryResultResource

NewSqlQueryResultResource constructs a SQL query result resource.

func (*SqlQueryResultResource) Close

func (r *SqlQueryResultResource) Close()

Close releases the resource lifecycle.

func (*SqlQueryResultResource) GetMux

func (r *SqlQueryResultResource) GetMux() srpc.Mux

GetMux returns the SRPC mux for this resource.

func (*SqlQueryResultResource) GetResultGrid

GetResultGrid returns the persisted result grid.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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