s4wave_sql_schema

package
v0.55.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SRPCSqlSchemaResourceServiceServiceID = "s4wave.sql.schema.SqlSchemaResourceService"
View Source
const SqlSchemaTypeID = "sql/schema"

SqlSchemaTypeID is the world ObjectType id for SQL schemas.

Variables

This section is empty.

Functions

func NewSRPCSqlSchemaResourceServiceHandler

func NewSRPCSqlSchemaResourceServiceHandler(impl SRPCSqlSchemaResourceServiceServer, serviceID string) srpc.Handler

NewSRPCSqlSchemaResourceServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: s4wave.sql.schema.SqlSchemaResourceService

func NewSchemaBlock

func NewSchemaBlock() block.Block

NewSchemaBlock constructs a SQL schema block.

func SRPCRegisterSqlSchemaResourceService

func SRPCRegisterSqlSchemaResourceService(mux srpc.Mux, impl SRPCSqlSchemaResourceServiceServer) error

SRPCRegisterSqlSchemaResourceService registers the implementation with the mux. Uses the default serviceID: s4wave.sql.schema.SqlSchemaResourceService

func SyncSchemaGraphQuads

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

SyncSchemaGraphQuads replaces the schema's target database graph link.

func WriteSchemaRootRef

func WriteSchemaRootRef(ctx context.Context, ws world.WorldState, schema *Schema) (*bucket.ObjectRef, error)

WriteSchemaRootRef writes a SQL schema root block and returns its ref.

Types

type GetSchemaRequest

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

GetSchemaRequest is a request for schema metadata.

func (*GetSchemaRequest) CloneMessageVT

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

func (*GetSchemaRequest) CloneVT

func (m *GetSchemaRequest) CloneVT() *GetSchemaRequest

func (*GetSchemaRequest) EqualMessageVT

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

func (*GetSchemaRequest) EqualVT

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

func (*GetSchemaRequest) MarshalJSON

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

MarshalJSON marshals the GetSchemaRequest to JSON.

func (*GetSchemaRequest) MarshalProtoJSON

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

MarshalProtoJSON marshals the GetSchemaRequest message to JSON.

func (*GetSchemaRequest) MarshalProtoText

func (x *GetSchemaRequest) MarshalProtoText() string

func (*GetSchemaRequest) MarshalToSizedBufferVT

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

func (*GetSchemaRequest) MarshalToVT

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

func (*GetSchemaRequest) MarshalVT

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

func (*GetSchemaRequest) ProtoMessage

func (*GetSchemaRequest) ProtoMessage()

func (*GetSchemaRequest) Reset

func (x *GetSchemaRequest) Reset()

func (*GetSchemaRequest) SizeVT

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

func (*GetSchemaRequest) String

func (x *GetSchemaRequest) String() string

func (*GetSchemaRequest) UnmarshalJSON

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

UnmarshalJSON unmarshals the GetSchemaRequest from JSON.

func (*GetSchemaRequest) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the GetSchemaRequest message from JSON.

func (*GetSchemaRequest) UnmarshalVT

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

type GetSchemaResponse

type GetSchemaResponse struct {

	// Schema is the persisted schema block.
	Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
	// contains filtered or unexported fields
}

GetSchemaResponse contains schema metadata.

func (*GetSchemaResponse) CloneMessageVT

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

func (*GetSchemaResponse) CloneVT

func (m *GetSchemaResponse) CloneVT() *GetSchemaResponse

func (*GetSchemaResponse) EqualMessageVT

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

func (*GetSchemaResponse) EqualVT

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

func (*GetSchemaResponse) GetSchema

func (x *GetSchemaResponse) GetSchema() *Schema

func (*GetSchemaResponse) MarshalJSON

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

MarshalJSON marshals the GetSchemaResponse to JSON.

func (*GetSchemaResponse) MarshalProtoJSON

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

MarshalProtoJSON marshals the GetSchemaResponse message to JSON.

func (*GetSchemaResponse) MarshalProtoText

func (x *GetSchemaResponse) MarshalProtoText() string

func (*GetSchemaResponse) MarshalToSizedBufferVT

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

func (*GetSchemaResponse) MarshalToVT

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

func (*GetSchemaResponse) MarshalVT

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

func (*GetSchemaResponse) ProtoMessage

func (*GetSchemaResponse) ProtoMessage()

func (*GetSchemaResponse) Reset

func (x *GetSchemaResponse) Reset()

func (*GetSchemaResponse) SizeVT

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

func (*GetSchemaResponse) String

func (x *GetSchemaResponse) String() string

func (*GetSchemaResponse) UnmarshalJSON

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

UnmarshalJSON unmarshals the GetSchemaResponse from JSON.

func (*GetSchemaResponse) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the GetSchemaResponse message from JSON.

func (*GetSchemaResponse) UnmarshalVT

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

type ListTablesRequest

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

ListTablesRequest is a request for tables in the schema.

func (*ListTablesRequest) CloneMessageVT

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

func (*ListTablesRequest) CloneVT

func (m *ListTablesRequest) CloneVT() *ListTablesRequest

func (*ListTablesRequest) EqualMessageVT

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

func (*ListTablesRequest) EqualVT

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

func (*ListTablesRequest) MarshalJSON

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

MarshalJSON marshals the ListTablesRequest to JSON.

func (*ListTablesRequest) MarshalProtoJSON

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

MarshalProtoJSON marshals the ListTablesRequest message to JSON.

func (*ListTablesRequest) MarshalProtoText

func (x *ListTablesRequest) MarshalProtoText() string

func (*ListTablesRequest) MarshalToSizedBufferVT

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

func (*ListTablesRequest) MarshalToVT

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

func (*ListTablesRequest) MarshalVT

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

func (*ListTablesRequest) ProtoMessage

func (*ListTablesRequest) ProtoMessage()

func (*ListTablesRequest) Reset

func (x *ListTablesRequest) Reset()

func (*ListTablesRequest) SizeVT

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

func (*ListTablesRequest) String

func (x *ListTablesRequest) String() string

func (*ListTablesRequest) UnmarshalJSON

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

UnmarshalJSON unmarshals the ListTablesRequest from JSON.

func (*ListTablesRequest) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the ListTablesRequest message from JSON.

func (*ListTablesRequest) UnmarshalVT

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

type ListTablesResponse

type ListTablesResponse struct {

	// Tables are the tables visible in the schema.
	Tables []*TableInfo `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"`
	// contains filtered or unexported fields
}

ListTablesResponse contains tables in the schema.

func (*ListTablesResponse) CloneMessageVT

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

func (*ListTablesResponse) CloneVT

func (m *ListTablesResponse) CloneVT() *ListTablesResponse

func (*ListTablesResponse) EqualMessageVT

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

func (*ListTablesResponse) EqualVT

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

func (*ListTablesResponse) GetTables

func (x *ListTablesResponse) GetTables() []*TableInfo

func (*ListTablesResponse) MarshalJSON

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

MarshalJSON marshals the ListTablesResponse to JSON.

func (*ListTablesResponse) MarshalProtoJSON

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

MarshalProtoJSON marshals the ListTablesResponse message to JSON.

func (*ListTablesResponse) MarshalProtoText

func (x *ListTablesResponse) MarshalProtoText() string

func (*ListTablesResponse) MarshalToSizedBufferVT

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

func (*ListTablesResponse) MarshalToVT

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

func (*ListTablesResponse) MarshalVT

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

func (*ListTablesResponse) ProtoMessage

func (*ListTablesResponse) ProtoMessage()

func (*ListTablesResponse) Reset

func (x *ListTablesResponse) Reset()

func (*ListTablesResponse) SizeVT

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

func (*ListTablesResponse) String

func (x *ListTablesResponse) String() string

func (*ListTablesResponse) UnmarshalJSON

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

UnmarshalJSON unmarshals the ListTablesResponse from JSON.

func (*ListTablesResponse) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the ListTablesResponse message from JSON.

func (*ListTablesResponse) UnmarshalVT

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

type SRPCSqlSchemaResourceServiceClient

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

	// GetSchema returns the schema metadata.
	GetSchema(ctx context.Context, in *GetSchemaRequest) (*GetSchemaResponse, error)
	// ListTables lists tables in the target sql/db schema.
	ListTables(ctx context.Context, in *ListTablesRequest) (*ListTablesResponse, error)
}

func NewSRPCSqlSchemaResourceServiceClient

func NewSRPCSqlSchemaResourceServiceClient(cc srpc.Client) SRPCSqlSchemaResourceServiceClient

func NewSRPCSqlSchemaResourceServiceClientWithServiceID

func NewSRPCSqlSchemaResourceServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCSqlSchemaResourceServiceClient

type SRPCSqlSchemaResourceServiceHandler

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

func (SRPCSqlSchemaResourceServiceHandler) GetMethodIDs

func (*SRPCSqlSchemaResourceServiceHandler) GetServiceID

func (d *SRPCSqlSchemaResourceServiceHandler) GetServiceID() string

func (*SRPCSqlSchemaResourceServiceHandler) InvokeMethod

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

func (SRPCSqlSchemaResourceServiceHandler) InvokeMethod_GetSchema

func (SRPCSqlSchemaResourceServiceHandler) InvokeMethod_ListTables

type SRPCSqlSchemaResourceServiceServer

type SRPCSqlSchemaResourceServiceServer interface {
	// GetSchema returns the schema metadata.
	GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error)
	// ListTables lists tables in the target sql/db schema.
	ListTables(context.Context, *ListTablesRequest) (*ListTablesResponse, error)
}

type SRPCSqlSchemaResourceService_GetSchemaStream

type SRPCSqlSchemaResourceService_GetSchemaStream interface {
	srpc.Stream
}

type SRPCSqlSchemaResourceService_ListTablesStream

type SRPCSqlSchemaResourceService_ListTablesStream interface {
	srpc.Stream
}

type Schema

type Schema struct {

	// SchemaName is the schema name inside the target sql/db.
	SchemaName string `protobuf:"bytes,1,opt,name=schema_name,json=schemaName,proto3" json:"schemaName,omitempty"`
	// TargetDbObjectKey is the sql/db object this schema belongs to.
	TargetDbObjectKey string `protobuf:"bytes,2,opt,name=target_db_object_key,json=targetDbObjectKey,proto3" json:"targetDbObjectKey,omitempty"`
	// DisplayName is an optional user-facing label.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"displayName,omitempty"`
	// Description is optional user-facing metadata.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Schema is a standalone SQL schema world object.

func ReadSchemaObjectRoot

func ReadSchemaObjectRoot(ctx context.Context, obj world.ObjectState) (*Schema, error)

ReadSchemaObjectRoot reads a SQL schema root from an object state.

func ReadSchemaRoot

func ReadSchemaRoot(ctx context.Context, ws world.WorldState, objectKey string) (*Schema, error)

ReadSchemaRoot reads a SQL schema object's root.

func (*Schema) CloneMessageVT

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

func (*Schema) CloneVT

func (m *Schema) CloneVT() *Schema

func (*Schema) EqualMessageVT

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

func (*Schema) EqualVT

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

func (*Schema) GetDescription

func (x *Schema) GetDescription() string

func (*Schema) GetDisplayName

func (x *Schema) GetDisplayName() string

func (*Schema) GetSchemaName

func (x *Schema) GetSchemaName() string

func (*Schema) GetTargetDbObjectKey

func (x *Schema) GetTargetDbObjectKey() string

func (*Schema) MarshalBlock

func (s *Schema) MarshalBlock() ([]byte, error)

MarshalBlock marshals the SQL schema root.

func (*Schema) MarshalJSON

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

MarshalJSON marshals the Schema to JSON.

func (*Schema) MarshalProtoJSON

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

MarshalProtoJSON marshals the Schema message to JSON.

func (*Schema) MarshalProtoText

func (x *Schema) MarshalProtoText() string

func (*Schema) MarshalToSizedBufferVT

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

func (*Schema) MarshalToVT

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

func (*Schema) MarshalVT

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

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) Reset

func (x *Schema) Reset()

func (*Schema) SizeVT

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

func (*Schema) String

func (x *Schema) String() string

func (*Schema) UnmarshalBlock

func (s *Schema) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the SQL schema root.

func (*Schema) UnmarshalJSON

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

UnmarshalJSON unmarshals the Schema from JSON.

func (*Schema) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the Schema message from JSON.

func (*Schema) UnmarshalVT

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

func (*Schema) Validate

func (s *Schema) Validate() error

Validate performs cursory checks on the SQL schema root.

type TableInfo

type TableInfo struct {

	// Name is the table name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

TableInfo describes a SQL table.

func (*TableInfo) CloneMessageVT

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

func (*TableInfo) CloneVT

func (m *TableInfo) CloneVT() *TableInfo

func (*TableInfo) EqualMessageVT

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

func (*TableInfo) EqualVT

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

func (*TableInfo) GetName

func (x *TableInfo) GetName() string

func (*TableInfo) MarshalJSON

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

MarshalJSON marshals the TableInfo to JSON.

func (*TableInfo) MarshalProtoJSON

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

MarshalProtoJSON marshals the TableInfo message to JSON.

func (*TableInfo) MarshalProtoText

func (x *TableInfo) MarshalProtoText() string

func (*TableInfo) MarshalToSizedBufferVT

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

func (*TableInfo) MarshalToVT

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

func (*TableInfo) MarshalVT

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

func (*TableInfo) ProtoMessage

func (*TableInfo) ProtoMessage()

func (*TableInfo) Reset

func (x *TableInfo) Reset()

func (*TableInfo) SizeVT

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

func (*TableInfo) String

func (x *TableInfo) String() string

func (*TableInfo) UnmarshalJSON

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

UnmarshalJSON unmarshals the TableInfo from JSON.

func (*TableInfo) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the TableInfo message from JSON.

func (*TableInfo) UnmarshalVT

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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