postgres

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

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

func NewPostgres

func NewPostgres(ctx context.Context, conn *sql.Conn) Postgres

func (Postgres) AllCols

func (pg Postgres) AllCols() isql.Engine

func (Postgres) BeginTx

func (pg Postgres) BeginTx() (isql.Engine, error)

func (Postgres) Close

func (pg Postgres) Close() error

func (Postgres) Columns

func (pg Postgres) Columns(cols ...string) isql.Engine

func (Postgres) Commit

func (pg Postgres) Commit() error

func (Postgres) DeleteOne

func (pg Postgres) DeleteOne(filter ...any) error

func (Postgres) Exec

func (pg Postgres) Exec(query string, args ...any) (sql.Result, error)

func (Postgres) FindMany

func (pg Postgres) FindMany(documents any, filter ...any) error

func (Postgres) FindOne

func (pg Postgres) FindOne(document any, filter ...any) (bool, error)

func (Postgres) ID

func (pg Postgres) ID(id any) isql.Engine

func (Postgres) In

func (pg Postgres) In(col string, values ...any) isql.Engine

func (Postgres) InsertMany

func (pg Postgres) InsertMany(documents []any) ([]any, error)

func (Postgres) InsertOne

func (pg Postgres) InsertOne(document any) (id any, err error)

func (Postgres) MustCols

func (pg Postgres) MustCols(cols ...string) isql.Engine

func (Postgres) Query

func (pg Postgres) Query(query string, args ...any) (*sql.Rows, error)

func (Postgres) Rollback

func (pg Postgres) Rollback() error

func (Postgres) ShowSQL

func (pg Postgres) ShowSQL(showSQL bool) isql.Engine

func (Postgres) Sync

func (pg Postgres) Sync(tables ...any) error

func (Postgres) Table

func (pg Postgres) Table(name string) isql.Engine

func (Postgres) UpdateOne

func (pg Postgres) UpdateOne(document any) error

func (Postgres) Where

func (pg Postgres) Where(cond string, args ...any) isql.Engine

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

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