storagepostgres

package
v0.0.0-...-fba144e Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchSize

type BatchSize int

type GlogWriter

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

GlogWriter implements gorm.logger.Writer interface

func (*GlogWriter) Printf

func (g *GlogWriter) Printf(format string, values ...interface{})

type PostgresDb

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

func NewPostgresDb

func NewPostgresDb(dsn string, log logger.Logger, flagset *storageflags.PrefixFlagSet, opts ...PostgresOption) (*PostgresDb, error)

func NewPostgresDbHelper

func NewPostgresDbHelper(log logger.Logger, flagset *storageflags.PrefixFlagSet) (*PostgresDb, error)

func (*PostgresDb) AutoMigrate

func (p *PostgresDb) AutoMigrate(tables []interface{}) error

func (*PostgresDb) AutoMigrateToName

func (p *PostgresDb) AutoMigrateToName(tableName string, table interface{}) error

AutoMigrateItemTemporaryTable will create a item table named $tablename

func (*PostgresDb) GormDB

func (p *PostgresDb) GormDB() *gorm.DB

func (*PostgresDb) With

func (p *PostgresDb) With(ctx context.Context, tableName string) *gorm.DB

type PostgresOption

type PostgresOption interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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