We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*gorm.DB
github.com/pingcap/tidb/pkg/parser
type MirrorTableModifier struct { tblNameMap map[string]string } func (m *MirrorTableModifier) Enter(in ast.Node) (ast.Node, bool) { switch node := in.(type) { case *ast.TableName: if modifyName, ok := m.tblNameMap[node.Name.String()]; ok { node.Name = model.NewCIStr(modifyName) // modify table name here } } return in, false } func (m *MirrorTableModifier) Leave(in ast.Node) (ast.Node, bool) { return in, true }
The text was updated successfully, but these errors were encountered:
jinzhu
No branches or pull requests
Your Question
*gorm.DB
object like this https://gorm.io/zh_CN/docs/hooks.html#%E4%BF%AE%E6%94%B9%E5%BD%93%E5%89%8D%E6%93%8D%E4%BD%9CWhat I Want
github.com/pingcap/tidb/pkg/parser
to modify the SQL, for example:The text was updated successfully, but these errors were encountered: