MCPcopy
hub / github.com/go-gorm/gorm / GetQueryAndExecTx

Method GetQueryAndExecTx

migrator/migrator.go:111–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111func (m Migrator) GetQueryAndExecTx() (queryTx, execTx *gorm.DB) {
112 queryTx = m.DB.Session(&gorm.Session{})
113 execTx = queryTx
114 if m.DB.DryRun {
115 queryTx.DryRun = false
116 execTx = m.DB.Session(&gorm.Session{Logger: &printSQLLogger{Interface: m.DB.Logger}})
117 }
118 return queryTx, execTx
119}
120
121// AutoMigrate auto migrate values
122func (m Migrator) AutoMigrate(values ...interface{}) error {

Callers 1

AutoMigrateMethod · 0.95

Implementers 1

Migratormigrator/migrator.go

Calls 1

SessionMethod · 0.80

Tested by

no test coverage detected