s4wave_sql_table_view

package
v0.53.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SRPCSqlTableViewResourceServiceServiceID = "s4wave.sql.table_view.SqlTableViewResourceService"
View Source
const SqlTableViewTypeID = "sql/table-view"

SqlTableViewTypeID is the world ObjectType id for SQL table views.

Variables

This section is empty.

Functions

func NewSRPCSqlTableViewResourceServiceHandler

func NewSRPCSqlTableViewResourceServiceHandler(impl SRPCSqlTableViewResourceServiceServer, serviceID string) srpc.Handler

NewSRPCSqlTableViewResourceServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: s4wave.sql.table_view.SqlTableViewResourceService

func NewTableViewBlock

func NewTableViewBlock() block.Block

NewTableViewBlock constructs a SQL table view block.

func SRPCRegisterSqlTableViewResourceService

func SRPCRegisterSqlTableViewResourceService(mux srpc.Mux, impl SRPCSqlTableViewResourceServiceServer) error

SRPCRegisterSqlTableViewResourceService registers the implementation with the mux. Uses the default serviceID: s4wave.sql.table_view.SqlTableViewResourceService

func SyncTableViewGraphQuads

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

SyncTableViewGraphQuads replaces the table view's target schema graph link.

func WriteTableViewRootRef

func WriteTableViewRootRef(ctx context.Context, ws world.WorldState, tableView *TableView) (*bucket.ObjectRef, error)

WriteTableViewRootRef writes a SQL table view root block and returns its ref.

Types

type FetchRowsRequest

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

FetchRowsRequest executes the saved table view.

func (*FetchRowsRequest) CloneMessageVT

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

func (*FetchRowsRequest) CloneVT

func (m *FetchRowsRequest) CloneVT() *FetchRowsRequest

func (*FetchRowsRequest) EqualMessageVT

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

func (*FetchRowsRequest) EqualVT

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

func (*FetchRowsRequest) MarshalJSON

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

MarshalJSON marshals the FetchRowsRequest to JSON.

func (*FetchRowsRequest) MarshalProtoJSON

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

MarshalProtoJSON marshals the FetchRowsRequest message to JSON.

func (*FetchRowsRequest) MarshalProtoText

func (x *FetchRowsRequest) MarshalProtoText() string

func (*FetchRowsRequest) MarshalToSizedBufferVT

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

func (*FetchRowsRequest) MarshalToVT

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

func (*FetchRowsRequest) MarshalVT

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

func (*FetchRowsRequest) ProtoMessage

func (*FetchRowsRequest) ProtoMessage()

func (*FetchRowsRequest) Reset

func (x *FetchRowsRequest) Reset()

func (*FetchRowsRequest) SizeVT

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

func (*FetchRowsRequest) String

func (x *FetchRowsRequest) String() string

func (*FetchRowsRequest) UnmarshalJSON

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

UnmarshalJSON unmarshals the FetchRowsRequest from JSON.

func (*FetchRowsRequest) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the FetchRowsRequest message from JSON.

func (*FetchRowsRequest) UnmarshalVT

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

type FetchRowsResponse

type FetchRowsResponse struct {

	// Columns describes the returned 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"`
	// RowCount is the number of returned rows.
	RowCount uint64 `protobuf:"varint,3,opt,name=row_count,json=rowCount,proto3" json:"rowCount,omitempty"`
	// Truncated indicates rows were omitted by the view row limit.
	Truncated bool `protobuf:"varint,4,opt,name=truncated,proto3" json:"truncated,omitempty"`
	// contains filtered or unexported fields
}

FetchRowsResponse contains rows returned by the table view.

func (*FetchRowsResponse) CloneMessageVT

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

func (*FetchRowsResponse) CloneVT

func (m *FetchRowsResponse) CloneVT() *FetchRowsResponse

func (*FetchRowsResponse) EqualMessageVT

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

func (*FetchRowsResponse) EqualVT

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

func (*FetchRowsResponse) GetColumns

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

func (*FetchRowsResponse) GetRowBatches

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

func (*FetchRowsResponse) GetRowCount

func (x *FetchRowsResponse) GetRowCount() uint64

func (*FetchRowsResponse) GetTruncated

func (x *FetchRowsResponse) GetTruncated() bool

func (*FetchRowsResponse) MarshalJSON

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

MarshalJSON marshals the FetchRowsResponse to JSON.

func (*FetchRowsResponse) MarshalProtoJSON

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

MarshalProtoJSON marshals the FetchRowsResponse message to JSON.

func (*FetchRowsResponse) MarshalProtoText

func (x *FetchRowsResponse) MarshalProtoText() string

func (*FetchRowsResponse) MarshalToSizedBufferVT

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

func (*FetchRowsResponse) MarshalToVT

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

func (*FetchRowsResponse) MarshalVT

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

func (*FetchRowsResponse) ProtoMessage

func (*FetchRowsResponse) ProtoMessage()

func (*FetchRowsResponse) Reset

func (x *FetchRowsResponse) Reset()

func (*FetchRowsResponse) SizeVT

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

func (*FetchRowsResponse) String

func (x *FetchRowsResponse) String() string

func (*FetchRowsResponse) UnmarshalJSON

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

UnmarshalJSON unmarshals the FetchRowsResponse from JSON.

func (*FetchRowsResponse) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the FetchRowsResponse message from JSON.

func (*FetchRowsResponse) UnmarshalVT

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

type GetTableViewRequest

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

GetTableViewRequest is a request for table view metadata.

func (*GetTableViewRequest) CloneMessageVT

func (*GetTableViewRequest) CloneVT

func (*GetTableViewRequest) EqualMessageVT

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

func (*GetTableViewRequest) EqualVT

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

func (*GetTableViewRequest) MarshalJSON

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

MarshalJSON marshals the GetTableViewRequest to JSON.

func (*GetTableViewRequest) MarshalProtoJSON

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

MarshalProtoJSON marshals the GetTableViewRequest message to JSON.

func (*GetTableViewRequest) MarshalProtoText

func (x *GetTableViewRequest) MarshalProtoText() string

func (*GetTableViewRequest) MarshalToSizedBufferVT

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

func (*GetTableViewRequest) MarshalToVT

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

func (*GetTableViewRequest) MarshalVT

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

func (*GetTableViewRequest) ProtoMessage

func (*GetTableViewRequest) ProtoMessage()

func (*GetTableViewRequest) Reset

func (x *GetTableViewRequest) Reset()

func (*GetTableViewRequest) SizeVT

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

func (*GetTableViewRequest) String

func (x *GetTableViewRequest) String() string

func (*GetTableViewRequest) UnmarshalJSON

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

UnmarshalJSON unmarshals the GetTableViewRequest from JSON.

func (*GetTableViewRequest) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the GetTableViewRequest message from JSON.

func (*GetTableViewRequest) UnmarshalVT

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

type GetTableViewResponse

type GetTableViewResponse struct {

	// TableView is the persisted table view block.
	TableView *TableView `protobuf:"bytes,1,opt,name=table_view,json=tableView,proto3" json:"tableView,omitempty"`
	// contains filtered or unexported fields
}

GetTableViewResponse contains table view metadata.

func (*GetTableViewResponse) CloneMessageVT

func (*GetTableViewResponse) CloneVT

func (*GetTableViewResponse) EqualMessageVT

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

func (*GetTableViewResponse) EqualVT

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

func (*GetTableViewResponse) GetTableView

func (x *GetTableViewResponse) GetTableView() *TableView

func (*GetTableViewResponse) MarshalJSON

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

MarshalJSON marshals the GetTableViewResponse to JSON.

func (*GetTableViewResponse) MarshalProtoJSON

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

MarshalProtoJSON marshals the GetTableViewResponse message to JSON.

func (*GetTableViewResponse) MarshalProtoText

func (x *GetTableViewResponse) MarshalProtoText() string

func (*GetTableViewResponse) MarshalToSizedBufferVT

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

func (*GetTableViewResponse) MarshalToVT

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

func (*GetTableViewResponse) MarshalVT

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

func (*GetTableViewResponse) ProtoMessage

func (*GetTableViewResponse) ProtoMessage()

func (*GetTableViewResponse) Reset

func (x *GetTableViewResponse) Reset()

func (*GetTableViewResponse) SizeVT

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

func (*GetTableViewResponse) String

func (x *GetTableViewResponse) String() string

func (*GetTableViewResponse) UnmarshalJSON

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

UnmarshalJSON unmarshals the GetTableViewResponse from JSON.

func (*GetTableViewResponse) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the GetTableViewResponse message from JSON.

func (*GetTableViewResponse) UnmarshalVT

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

type SRPCSqlTableViewResourceServiceClient

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

	// GetTableView returns the table view metadata.
	GetTableView(ctx context.Context, in *GetTableViewRequest) (*GetTableViewResponse, error)
	// FetchRows executes the table view SELECT.
	FetchRows(ctx context.Context, in *FetchRowsRequest) (*FetchRowsResponse, error)
}

func NewSRPCSqlTableViewResourceServiceClient

func NewSRPCSqlTableViewResourceServiceClient(cc srpc.Client) SRPCSqlTableViewResourceServiceClient

func NewSRPCSqlTableViewResourceServiceClientWithServiceID

func NewSRPCSqlTableViewResourceServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCSqlTableViewResourceServiceClient

type SRPCSqlTableViewResourceServiceHandler

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

func (SRPCSqlTableViewResourceServiceHandler) GetMethodIDs

func (*SRPCSqlTableViewResourceServiceHandler) GetServiceID

func (*SRPCSqlTableViewResourceServiceHandler) InvokeMethod

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

func (SRPCSqlTableViewResourceServiceHandler) InvokeMethod_FetchRows

func (SRPCSqlTableViewResourceServiceHandler) InvokeMethod_GetTableView

type SRPCSqlTableViewResourceServiceServer

type SRPCSqlTableViewResourceServiceServer interface {
	// GetTableView returns the table view metadata.
	GetTableView(context.Context, *GetTableViewRequest) (*GetTableViewResponse, error)
	// FetchRows executes the table view SELECT.
	FetchRows(context.Context, *FetchRowsRequest) (*FetchRowsResponse, error)
}

type SRPCSqlTableViewResourceService_FetchRowsStream

type SRPCSqlTableViewResourceService_FetchRowsStream interface {
	srpc.Stream
}

type SRPCSqlTableViewResourceService_GetTableViewStream

type SRPCSqlTableViewResourceService_GetTableViewStream interface {
	srpc.Stream
}

type SortOrder

type SortOrder struct {

	// ColumnName is the column to sort.
	ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"columnName,omitempty"`
	// Descending sorts the column descending when true.
	Descending bool `protobuf:"varint,2,opt,name=descending,proto3" json:"descending,omitempty"`
	// contains filtered or unexported fields
}

SortOrder describes one ORDER BY term.

func (*SortOrder) CloneMessageVT

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

func (*SortOrder) CloneVT

func (m *SortOrder) CloneVT() *SortOrder

func (*SortOrder) EqualMessageVT

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

func (*SortOrder) EqualVT

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

func (*SortOrder) GetColumnName

func (x *SortOrder) GetColumnName() string

func (*SortOrder) GetDescending

func (x *SortOrder) GetDescending() bool

func (*SortOrder) MarshalJSON

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

MarshalJSON marshals the SortOrder to JSON.

func (*SortOrder) MarshalProtoJSON

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

MarshalProtoJSON marshals the SortOrder message to JSON.

func (*SortOrder) MarshalProtoText

func (x *SortOrder) MarshalProtoText() string

func (*SortOrder) MarshalToSizedBufferVT

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

func (*SortOrder) MarshalToVT

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

func (*SortOrder) MarshalVT

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

func (*SortOrder) ProtoMessage

func (*SortOrder) ProtoMessage()

func (*SortOrder) Reset

func (x *SortOrder) Reset()

func (*SortOrder) SizeVT

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

func (*SortOrder) String

func (x *SortOrder) String() string

func (*SortOrder) UnmarshalJSON

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

UnmarshalJSON unmarshals the SortOrder from JSON.

func (*SortOrder) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the SortOrder message from JSON.

func (*SortOrder) UnmarshalVT

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

type TableView

type TableView struct {

	// TargetSchemaObjectKey is the sql/schema object this view reads from.
	TargetSchemaObjectKey string `protobuf:"bytes,1,opt,name=target_schema_object_key,json=targetSchemaObjectKey,proto3" json:"targetSchemaObjectKey,omitempty"`
	// TargetTableName is the table name inside the target schema.
	TargetTableName string `protobuf:"bytes,2,opt,name=target_table_name,json=targetTableName,proto3" json:"targetTableName,omitempty"`
	// WhereExpression is an optional SQL WHERE expression.
	WhereExpression string `protobuf:"bytes,3,opt,name=where_expression,json=whereExpression,proto3" json:"whereExpression,omitempty"`
	// ProjectedColumns limits returned columns. Empty selects all columns.
	ProjectedColumns []string `protobuf:"bytes,4,rep,name=projected_columns,json=projectedColumns,proto3" json:"projectedColumns,omitempty"`
	// SortOrder orders returned rows.
	SortOrder []*SortOrder `protobuf:"bytes,5,rep,name=sort_order,json=sortOrder,proto3" json:"sortOrder,omitempty"`
	// RowLimit limits returned rows. Zero uses the default limit.
	RowLimit uint32 `protobuf:"varint,6,opt,name=row_limit,json=rowLimit,proto3" json:"rowLimit,omitempty"`
	// WhereParameters are positional bind arguments used by WhereExpression.
	WhereParameters []*sql.SqlValue `protobuf:"bytes,7,rep,name=where_parameters,json=whereParameters,proto3" json:"whereParameters,omitempty"`
	// DisplayName is an optional user-facing label.
	DisplayName string `protobuf:"bytes,8,opt,name=display_name,json=displayName,proto3" json:"displayName,omitempty"`
	// Description is optional user-facing metadata.
	Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

TableView is a standalone saved table projection and filter.

func ReadTableViewObjectRoot

func ReadTableViewObjectRoot(ctx context.Context, obj world.ObjectState) (*TableView, error)

ReadTableViewObjectRoot reads a SQL table view root from an object state.

func ReadTableViewRoot

func ReadTableViewRoot(ctx context.Context, ws world.WorldState, objectKey string) (*TableView, error)

ReadTableViewRoot reads a SQL table view object's root.

func (*TableView) CloneMessageVT

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

func (*TableView) CloneVT

func (m *TableView) CloneVT() *TableView

func (*TableView) EqualMessageVT

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

func (*TableView) EqualVT

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

func (*TableView) GetDescription

func (x *TableView) GetDescription() string

func (*TableView) GetDisplayName

func (x *TableView) GetDisplayName() string

func (*TableView) GetProjectedColumns

func (x *TableView) GetProjectedColumns() []string

func (*TableView) GetRowLimit

func (x *TableView) GetRowLimit() uint32

func (*TableView) GetSortOrder

func (x *TableView) GetSortOrder() []*SortOrder

func (*TableView) GetTargetSchemaObjectKey

func (x *TableView) GetTargetSchemaObjectKey() string

func (*TableView) GetTargetTableName

func (x *TableView) GetTargetTableName() string

func (*TableView) GetWhereExpression

func (x *TableView) GetWhereExpression() string

func (*TableView) GetWhereParameters

func (x *TableView) GetWhereParameters() []*sql.SqlValue

func (*TableView) MarshalBlock

func (v *TableView) MarshalBlock() ([]byte, error)

MarshalBlock marshals the SQL table view root.

func (*TableView) MarshalJSON

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

MarshalJSON marshals the TableView to JSON.

func (*TableView) MarshalProtoJSON

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

MarshalProtoJSON marshals the TableView message to JSON.

func (*TableView) MarshalProtoText

func (x *TableView) MarshalProtoText() string

func (*TableView) MarshalToSizedBufferVT

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

func (*TableView) MarshalToVT

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

func (*TableView) MarshalVT

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

func (*TableView) ProtoMessage

func (*TableView) ProtoMessage()

func (*TableView) Reset

func (x *TableView) Reset()

func (*TableView) SizeVT

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

func (*TableView) String

func (x *TableView) String() string

func (*TableView) UnmarshalBlock

func (v *TableView) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the SQL table view root.

func (*TableView) UnmarshalJSON

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

UnmarshalJSON unmarshals the TableView from JSON.

func (*TableView) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the TableView message from JSON.

func (*TableView) UnmarshalVT

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

func (*TableView) Validate

func (v *TableView) Validate() error

Validate performs cursory checks on the SQL table view root.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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