Documentation
¶
Index ¶
- func CheckTableData(t *testing.T, de *testutil.TestDisttaeEngine, ctx context.Context, ...)
- func CreateDBAndTableForCNConsumerAndGetAppendData(t *testing.T, de *testutil.TestDisttaeEngine, ctx context.Context, ...) *containers.Batch
- func CreateDBAndTableForHNSWAndGetAppendData(t *testing.T, de *testutil.TestDisttaeEngine, ctx context.Context, ...) *containers.Batch
- func GetTestISCPExecutorOption() *iscp.ISCPExecutorOption
- type MockAutoIncrementService
- func (m *MockAutoIncrementService) Close()
- func (m *MockAutoIncrementService) Create(ctx context.Context, tableID uint64, caches []incrservice.AutoColumn, ...) error
- func (m *MockAutoIncrementService) CurrentValue(ctx context.Context, tableID uint64, col string) (uint64, error)
- func (m *MockAutoIncrementService) Delete(ctx context.Context, tableID uint64, txn client.TxnOperator) error
- func (m *MockAutoIncrementService) GetLastAllocateTS(ctx context.Context, tableID uint64, colName string) (timestamp.Timestamp, error)
- func (m *MockAutoIncrementService) InsertValues(ctx context.Context, tableID uint64, vecs []*vector.Vector, rows int, ...) (uint64, error)
- func (m *MockAutoIncrementService) Reload(ctx context.Context, tableID uint64) error
- func (m *MockAutoIncrementService) Reset(ctx context.Context, oldTableID, newTableID uint64, keep bool, ...) error
- func (m *MockAutoIncrementService) UUID() string
- type UpstreamSQLHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTableData ¶
func GetTestISCPExecutorOption ¶
func GetTestISCPExecutorOption() *iscp.ISCPExecutorOption
Types ¶
type MockAutoIncrementService ¶
type MockAutoIncrementService struct {
// contains filtered or unexported fields
}
MockAutoIncrementService is a mock implementation of AutoIncrementService for testing
func NewMockAutoIncrementService ¶
func NewMockAutoIncrementService(uuid string) *MockAutoIncrementService
NewMockAutoIncrementService creates a new MockAutoIncrementService
func (*MockAutoIncrementService) Close ¶
func (m *MockAutoIncrementService) Close()
Close closes the service
func (*MockAutoIncrementService) Create ¶
func (m *MockAutoIncrementService) Create( ctx context.Context, tableID uint64, caches []incrservice.AutoColumn, txn client.TxnOperator, ) error
Create creates cache for auto-increment columns
func (*MockAutoIncrementService) CurrentValue ¶
func (m *MockAutoIncrementService) CurrentValue( ctx context.Context, tableID uint64, col string, ) (uint64, error)
CurrentValue returns current value of an auto-increment column
func (*MockAutoIncrementService) Delete ¶
func (m *MockAutoIncrementService) Delete( ctx context.Context, tableID uint64, txn client.TxnOperator, ) error
Delete deletes auto-increment cache for a table
func (*MockAutoIncrementService) GetLastAllocateTS ¶
func (m *MockAutoIncrementService) GetLastAllocateTS( ctx context.Context, tableID uint64, colName string, ) (timestamp.Timestamp, error)
GetLastAllocateTS returns the last allocate timestamp
func (*MockAutoIncrementService) InsertValues ¶
func (m *MockAutoIncrementService) InsertValues( ctx context.Context, tableID uint64, vecs []*vector.Vector, rows int, estimate int64, ) (uint64, error)
InsertValues inserts auto-increment values into vectors
func (*MockAutoIncrementService) Reload ¶
func (m *MockAutoIncrementService) Reload(ctx context.Context, tableID uint64) error
Reload reloads auto-increment cache
func (*MockAutoIncrementService) Reset ¶
func (m *MockAutoIncrementService) Reset( ctx context.Context, oldTableID, newTableID uint64, keep bool, txn client.TxnOperator, ) error
Reset resets auto-increment cache
func (*MockAutoIncrementService) UUID ¶
func (m *MockAutoIncrementService) UUID() string
UUID returns the uuid of this increment service
type UpstreamSQLHelper ¶
type UpstreamSQLHelper struct {
// contains filtered or unexported fields
}
UpstreamSQLHelper handles special SQL statements (CREATE/DROP SNAPSHOT, OBJECTLIST, GET OBJECT, GETDDL) by routing them through frontend processing logic without requiring a Session
func NewUpstreamSQLHelper ¶
func NewUpstreamSQLHelper( txnOp client.TxnOperator, engine engine.Engine, accountID uint32, executor executor.SQLExecutor, txnClient client.TxnClient, ) *UpstreamSQLHelper
NewUpstreamSQLHelper creates a new UpstreamSQLHelper txnClient is optional - if provided, it will be used to create new transactions when needed
func (*UpstreamSQLHelper) HandleSpecialSQL ¶
func (h *UpstreamSQLHelper) HandleSpecialSQL( ctx context.Context, query string, ) (bool, *publication.Result, error)
HandleSpecialSQL checks if the SQL is a special statement and handles it directly Returns (handled, result, error) where handled indicates if the statement was handled If a new transaction was created (because there was no txn initially), it will be committed on success or rolled back on error
func (*UpstreamSQLHelper) SetTxnOp ¶
func (h *UpstreamSQLHelper) SetTxnOp(txnOp client.TxnOperator)
SetTxnOp sets the transaction operator (called after StartTxn) This clears the createdTxnOp flag since the txn is now managed externally