This commit is contained in:
John 2020-11-29 23:55:32 +08:00
parent 6f93bd17f2
commit 790a651ac1
2 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ const (
OPTION_ALLOWEMPTY = 2
linkTypeMaster = 1
linkTypeMSlave = 2
linkTypeSlave = 2
whereHolderWhere = 1
whereHolderAnd = 2
whereHolderOr = 3
@ -198,7 +198,7 @@ func (m *Model) Master() *Model {
// Note that it makes sense only if there's any slave node configured.
func (m *Model) Slave() *Model {
model := m.getModel()
model.linkType = linkTypeMSlave
model.linkType = linkTypeSlave
return model
}

View File

@ -151,7 +151,7 @@ func (m *Model) getLink(master bool) Link {
if master {
linkType = linkTypeMaster
} else {
linkType = linkTypeMSlave
linkType = linkTypeSlave
}
}
switch linkType {
@ -161,7 +161,7 @@ func (m *Model) getLink(master bool) Link {
panic(err)
}
return link
case linkTypeMSlave:
case linkTypeSlave:
link, err := m.db.GetSlave(m.schema)
if err != nil {
panic(err)