Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration interface { GetDefaultPostgreSQLConfigs() *PostgreSQLConfig GetCustomPostgreSQLConfigs(database string, host string, username string, password string) *PostgreSQLConfig }
func New ¶
func New(env environment.Environment) Configuration
type PostgreSQLConfig ¶ added in v1.0.6
type PostgreSQLService ¶ added in v1.0.6
type PostgreSQLService interface { Create(value interface{}) (tx *gorm.DB) CreateInBatches(value interface{}, batchSize int) (tx *gorm.DB) Save(value interface{}) (tx *gorm.DB) First(dest interface{}, conds ...interface{}) (tx *gorm.DB) Take(dest interface{}, conds ...interface{}) (tx *gorm.DB) Last(dest interface{}, conds ...interface{}) (tx *gorm.DB) Find(dest interface{}, conds ...interface{}) (tx *gorm.DB) FindInBatches(dest interface{}, batchSize int, fc func(tx *gorm.DB, batch int) error) *gorm.DB FirstOrInit(dest interface{}, conds ...interface{}) (tx *gorm.DB) FirstOrCreate(dest interface{}, conds ...interface{}) (tx *gorm.DB) Update(column string, value interface{}) (tx *gorm.DB) Updates(values interface{}) (tx *gorm.DB) UpdateColumn(column string, value interface{}) (tx *gorm.DB) UpdateColumns(values interface{}) (tx *gorm.DB) Delete(value interface{}, conds ...interface{}) (tx *gorm.DB) Count(count *int64) (tx *gorm.DB) Row() *sql.Row Rows() (*sql.Rows, error) Scan(dest interface{}) (tx *gorm.DB) Pluck(column string, dest interface{}) (tx *gorm.DB) ScanRows(rows *sql.Rows, dest interface{}) error Connection(fc func(tx *gorm.DB) error) (err error) Transaction(fc func(tx *gorm.DB) error, opts ...*sql.TxOptions) (err error) Begin(opts ...*sql.TxOptions) *gorm.DB Commit() *gorm.DB Rollback() *gorm.DB SavePoint(name string) *gorm.DB RollbackTo(name string) *gorm.DB Exec(sql string, values ...interface{}) (tx *gorm.DB) }
func NewPostgreSQLService ¶ added in v1.0.6
func NewPostgreSQLService(config dbConfig) (PostgreSQLService, error)
func NewPostgreSQLServiceByDSN ¶ added in v1.0.6
func NewPostgreSQLServiceByDSN(dsn string) (PostgreSQLService, error)
Click to show internal directories.
Click to hide internal directories.