shardingsphere

package
v0.0.0-...-f5de34e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DistSQLCreateDatabase create database if not exists.
	DistSQLCreateDatabase = `CREATE DATABASE IF NOT EXISTS %s;`
	// DistSQLUseDatabase use database.
	DistSQLUseDatabase = `USE %s;`
	// DistSQLRegisterStorageUnit register database to shardingsphere by storage unit name and database info.
	DistSQLRegisterStorageUnit = `REGISTER STORAGE UNIT IF NOT EXISTS %s (HOST="%s",PORT=%d,DB="%s",USER="%s",PASSWORD="%s");`
	// DistSQLShowRulesUsed show all rules used by storage unit name.
	DistSQLShowRulesUsed = `SHOW RULES USED STORAGE UNIT %s;`
	// DistSQLUnRegisterStorageUnit unregister database from shardingsphere by storage unit name.
	DistSQLUnRegisterStorageUnit = `UNREGISTER STORAGE UNIT %s;`
	// DistSQLDropRule drop rule by rule type and rule name.
	DistSQLDropRule = `DROP %s RULE %s;`
	// DistSQLDropTable drop table by table name.
	DistSQLDropTable = `DROP TABLE %s;`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IServer

type IServer interface {
	CreateDatabase(dbName string) error
	RegisterStorageUnit(logicDBName, dsName, dsHost string, dsPort uint, dsDBName, dsUser, dsPassword string) error
	UnRegisterStorageUnit(logicDBName, dsName string) error
	Close() error
}

func NewServer

func NewServer(driver, host string, port uint, user, password string) (IServer, error)

type Rule

type Rule struct {
	Type string
	Name string
}

Directories

Path Synopsis
Package mock_shardingsphere is a generated GoMock package.
Package mock_shardingsphere is a generated GoMock package.

Jump to

Keyboard shortcuts

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