Add NewDB as a Shortcut Call

This commit is contained in:
Abdelaziz Elrashed 2021-02-02 11:55:38 +03:00
parent 8f37cb0195
commit 7a55fef94c

View File

@ -248,6 +248,11 @@ func (db *DB) Debug() (tx *DB) {
})
}
// NewDB clone a new db connection without search conditions
func (db *DB) NewDB() *DB {
return db.Session(&Session{NewDB: true})
}
// Set store value with key into current db instance's context
func (db *DB) Set(key string, value interface{}) *DB {
tx := db.getInstance()