Documentation ¶
Overview ¶
Package db manages database client and schema migrations to interact with entities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶
type MemoryClientFactory ¶
type MemoryClientFactory struct {
// contains filtered or unexported fields
}
MemoryClientFactory produces simple in-memory sqlite database clients for development and testing.
func NewMemoryClientFactory ¶
func NewMemoryClientFactory(cfg *holos.Config) *MemoryClientFactory
NewMemoryClientFactory returns a MemoryClientFactory implementation of ClientFactory
func (*MemoryClientFactory) New ¶
func (mc *MemoryClientFactory) New() (Conn, error)
type PGXClientFactory ¶
type PGXClientFactory struct {
// contains filtered or unexported fields
}
PGXClientFactory produces pgx clients suitable for live workloads
func NewPGXClientFactory ¶
func NewPGXClientFactory(cfg *holos.Config) *PGXClientFactory
NewPGXClientFactory returns a PGXClientFactory implementation of ClientFactory
func (*PGXClientFactory) New ¶
func (mc *PGXClientFactory) New() (Conn, error)
New returns a new ent.Client using pgx with PostgreSQL
Click to show internal directories.
Click to hide internal directories.