pg_grpc

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializePostgresClient

func InitializePostgresClient() (pb.PostgresClient, error)

Types

type Database

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

func NewDatabase

func NewDatabase(ctx context.Context, client pb.PostgresClient) Database

func (Database) AllCols

func (d Database) AllCols() isql.Engine

func (Database) Columns

func (d Database) Columns(s ...string) isql.Engine

func (Database) DeleteOne

func (d Database) DeleteOne(filter ...interface{}) error

func (Database) Exec

func (d Database) Exec(query string, args ...interface{}) (sql.Result, error)

func (Database) FindMany

func (d Database) FindMany(documents interface{}, filter ...interface{}) error

func (Database) FindOne

func (d Database) FindOne(document interface{}, filter ...interface{}) (bool, error)

func (Database) ID

func (d Database) ID(id any) isql.Engine

func (Database) In

func (d Database) In(s string, a ...any) isql.Engine

func (Database) InsertMany

func (d Database) InsertMany(documents []interface{}) ([]int64, error)

TODO: Implement in a more efficient way

func (Database) InsertOne

func (d Database) InsertOne(document interface{}) (id int64, err error)

func (Database) Query

func (d Database) Query(query string, args ...interface{}) (*sql.Rows, error)

func (Database) Sync

func (d Database) Sync(...any) error

func (Database) Table

func (d Database) Table(name string) isql.Engine

func (Database) UpdateOne

func (d Database) UpdateOne(document interface{}) error

func (Database) Where

func (d Database) Where(s string, a ...any) isql.Engine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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