Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashShardAlgo ¶
HashShardAlgo hash shard algorithm
Types ¶
type Hint ¶
Hint to extra process. Nodes: /*!saashard nodes=node1,node2 */ OnMaster: /*!saashard master */
type Plan ¶
type Plan interface { Route Execute(executor func(statements []sqlparser.Statement, results []*mysql.Result, dataNodes []string, isSlave bool, queryDataNodes map[sqlparser.Statement][]string) (backendConnAddrs []string, err error), clientAddr net.Addr, logSQLEnabled bool, slowLogTime int, counter *statistic.Counter) error ExecuteWithStmtPrepare(executor func(statements []sqlparser.Statement, results []*mysql.Result, dataNodes []string, isSlave bool, queryDataNodes map[sqlparser.Statement][]string) (*mysql.Stmt, error), clientAddr net.Addr, logSQLEnabled bool, slowLogTime int, counter *statistic.Counter) (*mysql.Stmt, error) }
Plan to execute.
type Router ¶
type Router struct { SchemaName string Schemas map[string]*config.SchemaConfig Nodes map[string]*config.NodeConfig ConnectionID uint32 User string InTrans bool }
Router used to build plan.
func NewRouter ¶
func NewRouter(schemaName string, schemas map[string]*config.SchemaConfig, nodes map[string]*config.NodeConfig, connectionID uint32, user string, inTrans bool) *Router
NewRouter to create router.
func (*Router) BuildMergedPlan ¶
BuildMergedPlan to merge from plan array.
type ShardAlgorithm ¶
ShardAlgorithm shard algorithm
func ParseShardAlgorithm ¶
func ParseShardAlgorithm(name string) ShardAlgorithm
ParseShardAlgorithm parse ShardAlgorithm
Click to show internal directories.
Click to hide internal directories.