Documentation ¶
Index ¶
- Constants
- func NewClient(ctx context.Context, c driver.Config) (*gorm.DB, error)
- type DBClient
- func (dbc *DBClient) GetClient(instanceName string) (*gorm.DB, error)
- func (dbc *DBClient) GetDefaultClient() (*gorm.DB, error)
- func (dbc *DBClient) GetDefaultGeneratedConfig() (dbDriver.Config, error)
- func (dbc *DBClient) GetDriverInstance() *dbinstance.Instance
- func (dbc *DBClient) GetInstanceConfig(instanceName string) (dbDriver.Config, error)
- func (dbc *DBClient) New(config dbDriver.Config) (*gorm.DB, error)
- func (dbc *DBClient) NewClient(instanceName string) (*gorm.DB, error)
Constants ¶
View Source
const CockroachDriver = "cockroach"
View Source
const MySQLDriver = "mysql"
View Source
const PostGRESDriver = "postgres"
View Source
const SQLiteDriver = "sqlite"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBClient ¶
type DBClient struct { DriverType string Ctx context.Context // contains filtered or unexported fields }
func (*DBClient) GetDefaultClient ¶
GetDefaultClient -> it returns the default client based on the existing app configuration
func (*DBClient) GetDefaultGeneratedConfig ¶
func (*DBClient) GetDriverInstance ¶
func (dbc *DBClient) GetDriverInstance() *dbinstance.Instance
func (*DBClient) GetInstanceConfig ¶
Click to show internal directories.
Click to hide internal directories.