dbv2

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Numeric = "NUMERIC"
	Text    = "TEXT"
	Json    = "JSON"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func NewPostgresDB

func NewPostgresDB(ctx context.Context, url, schema string, reset bool) (*DB, error)

func (*DB) DeleteTable

func (d *DB) DeleteTable(name string) error

func (*DB) EnsureSchema

func (d *DB) EnsureSchema() error

func (*DB) EnsureTable

func (d *DB) EnsureTable(name string, tableSchema string) error

func (*DB) GetRows

func (d *DB) GetRows(ctx context.Context, table string) error

func (*DB) LoadIn

func (d *DB) LoadIn(ctx context.Context, r io.Reader, copyCmd string) (int64, error)

func (*DB) Schema

func (d *DB) Schema() string

Jump to

Keyboard shortcuts

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