()
| 109 | } |
| 110 | |
| 111 | func (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 |
| 122 | func (m Migrator) AutoMigrate(values ...interface{}) error { |
no test coverage detected