Documentation
¶
Index ¶
- Variables
- type Placeholder
- type Pool
- func (pgPool *Pool) CreateSchema(ctx context.Context, db string) error
- func (pgPool *Pool) CreateTable(ctx context.Context, db, collection string) error
- func (pgPool *Pool) DropSchema(ctx context.Context, db string) error
- func (pgPool *Pool) DropTable(ctx context.Context, db, collection string) error
- func (pgPool *Pool) Schemas(ctx context.Context) ([]string, error)
- func (pgPool *Pool) TableStats(ctx context.Context, db, table string) (*TableStats, error)
- func (pgPool *Pool) Tables(ctx context.Context, db string) ([]string, error)
- type TableStats
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotExist = fmt.Errorf("schema or table does not exist") ErrAlreadyExist = fmt.Errorf("schema or table already exist") )
Functions ¶
This section is empty.
Types ¶
type Placeholder ¶
type Placeholder int
func (*Placeholder) Next ¶
func (p *Placeholder) Next() string
type Pool ¶
Pool data struct for *pgxpool.Pool.
func (*Pool) CreateSchema ¶ added in v0.0.5
CreateSchema creates a new FerretDB database / PostgreSQL schema.
It returns ErrAlreadyExist if schema already exist.
func (*Pool) CreateTable ¶ added in v0.0.5
CreateTable creates a new FerretDB collection / PostgreSQL jsonb table.
It returns ErrAlreadyExist if table already exist.
func (*Pool) DropSchema ¶ added in v0.0.5
DropSchema drops FerretDB database / PostgreSQL schema.
It returns ErrNotExist if schema does not exist.
func (*Pool) DropTable ¶ added in v0.0.5
DropTable drops FerretDB collection / PostgreSQL table.
It returns ErrNotExist is table does not exist.
func (*Pool) Schemas ¶ added in v0.0.5
Schemas returns a sorted list of FerretDB database / PostgreSQL schema names.
func (*Pool) TableStats ¶ added in v0.0.5
TableStats returns a set of statistics for a table.
Click to show internal directories.
Click to hide internal directories.