mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
SetVersions Fix
This commit is contained in:
@@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
type MySQLStorage struct {
|
||||
*SQLStorage
|
||||
SQLStorage
|
||||
}
|
||||
|
||||
func NewMySQLStorage(host, port, name, user, password string, maxConn, maxIdleConn int) (*SQLStorage, error) {
|
||||
@@ -43,6 +43,8 @@ func NewMySQLStorage(host, port, name, user, password string, maxConn, maxIdleCo
|
||||
db.DB().SetMaxOpenConns(maxConn)
|
||||
//db.LogMode(true)
|
||||
mySQLStorage := new(MySQLStorage)
|
||||
mySQLStorage.db = db
|
||||
mySQLStorage.Db = db.DB()
|
||||
return &SQLStorage{db.DB(), db, mySQLStorage, mySQLStorage}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,13 @@ func NewPostgresStorage(host, port, name, user, password string, maxConn, maxIdl
|
||||
db.DB().SetMaxOpenConns(maxConn)
|
||||
//db.LogMode(true)
|
||||
postgressStorage := new(PostgresStorage)
|
||||
postgressStorage.db = db
|
||||
postgressStorage.Db = db.DB()
|
||||
return &SQLStorage{db.DB(), db, postgressStorage, postgressStorage}, nil
|
||||
}
|
||||
|
||||
type PostgresStorage struct {
|
||||
*SQLStorage
|
||||
SQLStorage
|
||||
}
|
||||
|
||||
func (self *PostgresStorage) SetVersions(vrs Versions, overwrite bool) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user