Documentation ¶
Index ¶
- Constants
- func NewPgController(dbConfig Config, entityDefinitions, baseEntities []database.DocumentBase) database.DatabaseController
- func NewTransactionFactory(db *MongoDatabase) database.MongoTransactionFactory
- type Config
- type MongoController
- type MongoDatabase
- type Transaction
- type TransactionFactory
Constants ¶
View Source
const Public = "public"
Variables ¶
This section is empty.
Functions ¶
func NewPgController ¶
func NewPgController(dbConfig Config, entityDefinitions, baseEntities []database.DocumentBase) database.DatabaseController
func NewTransactionFactory ¶
func NewTransactionFactory(db *MongoDatabase) database.MongoTransactionFactory
Types ¶
type Config ¶
type Config struct { Host string Port int Username string Password string Name string Driver string Schema string IgnorePermissionDenied bool Timeout int SSL string Clustered bool }
func (*Config) GetTableSchema ¶
type MongoController ¶
type MongoController struct {
// contains filtered or unexported fields
}
func (*MongoController) Generate ¶
func (d *MongoController) Generate() error
func (*MongoController) GetTransactionFactory ¶
func (d *MongoController) GetTransactionFactory() (database.MongoTransactionFactory, error)
func (*MongoController) Init ¶
func (d *MongoController) Init() error
type MongoDatabase ¶
func NewMoDatabase ¶
func NewMoDatabase(DBConfig Config) *MongoDatabase
func (*MongoDatabase) GetMongo ¶
func (md *MongoDatabase) GetMongo() *mongo.Database
func (*MongoDatabase) Open ¶
func (md *MongoDatabase) Open() error
func (*MongoDatabase) OpenRaw ¶
func (md *MongoDatabase) OpenRaw() error
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) GetDataContext ¶
func (m *Transaction) GetDataContext() any
func (*Transaction) RollbackUnlessCommitted ¶
func (m *Transaction) RollbackUnlessCommitted(ctx context.Context)
type TransactionFactory ¶
type TransactionFactory struct {
// contains filtered or unexported fields
}
func (TransactionFactory) New ¶
func (t TransactionFactory) New() database.Transaction
Click to show internal directories.
Click to hide internal directories.