Documentation
¶
Overview ¶
Package starrocks is the plugin for the StarRocks and Doris drivers. Both engines speak the MySQL wire protocol and share one schema-sync implementation; they differ only in their system databases and their materialized-view catalog.
Index ¶
- type Driver
- func (d *Driver) Close(context.Context) error
- func (d *Driver) GetDB() *sql.DB
- func (d *Driver) GetObjectDefinition(ctx context.Context, objectType storepb.MetaType, name string) (string, bool, error)
- func (d *Driver) Open(ctx context.Context, dbType storepb.Engine, connCfg db.ConnectionConfig) (db.Driver, error)
- func (d *Driver) Ping(ctx context.Context) error
- func (d *Driver) SyncDBSchema(ctx context.Context) (metadata *storepb.DatabaseSchemaMetadata, err error)
- func (d *Driver) SyncInstance(ctx context.Context) (*db.InstanceMetadata, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the StarRocks/Doris driver.
func (*Driver) GetObjectDefinition ¶
func (d *Driver) GetObjectDefinition(ctx context.Context, objectType storepb.MetaType, name string) (string, bool, error)
GetObjectDefinition returns the server's own DDL for an object. The catalog metadata cannot express StarRocks/Doris distribution, properties or partitioning, so the definition has to come from the server rather than being reconstructed.
func (*Driver) Open ¶
func (d *Driver) Open(ctx context.Context, dbType storepb.Engine, connCfg db.ConnectionConfig) (db.Driver, error)
Open opens a StarRocks/Doris driver.
func (*Driver) SyncDBSchema ¶
func (d *Driver) SyncDBSchema(ctx context.Context) (metadata *storepb.DatabaseSchemaMetadata, err error)
SyncDBSchema syncs a single database schema. A database the target no longer has is reported as common.NotFound, which is what tells a caller mirroring the target's inventory apart from a permission or connectivity failure.
func (*Driver) SyncInstance ¶
SyncInstance syncs the instance.