postgres

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 24 Imported by: 1

README

postgres

The Postgres driver for facades.Orm() of Goravel.

Documentation

Index

Constants

View Source
const (
	Binding    = "goravel.postgres"
	DriverName = "postgres"
)

Variables

View Source
var (
	OrmDatabaseConfigNotFound = errors.New("orm database config not found")
)

Functions

This section is empty.

Types

type ConfigBuilder

type ConfigBuilder struct {
	// contains filtered or unexported fields
}

func NewConfigBuilder

func NewConfigBuilder(config contractsconfig.Config, connection string) *ConfigBuilder

func (*ConfigBuilder) Config

func (c *ConfigBuilder) Config() contractsconfig.Config

func (*ConfigBuilder) Connection

func (c *ConfigBuilder) Connection() string

func (*ConfigBuilder) Reads

func (c *ConfigBuilder) Reads() []contracts.FullConfig

func (*ConfigBuilder) Writes

func (c *ConfigBuilder) Writes() []contracts.FullConfig

type Docker

type Docker struct {
	// contains filtered or unexported fields
}

func NewDocker

func NewDocker(database, username, password string) *Docker

func (*Docker) Build

func (r *Docker) Build() error

func (*Docker) Config

func (r *Docker) Config() testing.DatabaseConfig

func (*Docker) Database

func (r *Docker) Database(name string) (testing.DatabaseDriver, error)

func (*Docker) Driver

func (r *Docker) Driver() database.Driver

func (*Docker) Fresh

func (r *Docker) Fresh() error

func (*Docker) Image

func (r *Docker) Image(image testing.Image)

func (*Docker) Ready

func (r *Docker) Ready() error

func (*Docker) Shutdown

func (r *Docker) Shutdown() error

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func NewPostgres

func NewPostgres(configBuilder *ConfigBuilder, log log.Log) *Postgres

func (*Postgres) Config

func (r *Postgres) Config() database.Config1

func (*Postgres) Docker

func (r *Postgres) Docker() (testing.DatabaseDriver, error)

func (*Postgres) Gorm

func (r *Postgres) Gorm() (*gorm.DB, error)

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (receiver *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (receiver *ServiceProvider) Register(app foundation.Application)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL