database

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

type MongoDB struct {
	Name     string
	Database string
	Options  *options.ClientOptions
	// contains filtered or unexported fields
}

func (*MongoDB) Count

func (t *MongoDB) Count(ctx context.Context, query interface{}, args ...interface{}) int64

func (*MongoDB) Delete

func (t *MongoDB) Delete(ctx context.Context, query interface{}, args ...interface{}) int64

func (*MongoDB) Exec

func (t *MongoDB) Exec(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*MongoDB) Exists

func (t *MongoDB) Exists(ctx context.Context, query interface{}, args ...interface{}) bool

func (*MongoDB) Find

func (t *MongoDB) Find(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*MongoDB) FindOne

func (t *MongoDB) FindOne(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*MongoDB) GetDb

func (t *MongoDB) GetDb() interface{}

func (*MongoDB) Init

func (t *MongoDB) Init(app interfaces.IService) error

func (*MongoDB) Stop

func (t *MongoDB) Stop() error

func (*MongoDB) String

func (t *MongoDB) String() string

func (*MongoDB) Update

func (t *MongoDB) Update(ctx context.Context, query interface{}, args ...interface{}) error

type Postgres

type Postgres struct {
	Name     string
	Database string
	URI      string
	// contains filtered or unexported fields
}

func (*Postgres) Count

func (t *Postgres) Count(ctx context.Context, query interface{}, args ...interface{}) int64

func (*Postgres) Delete

func (t *Postgres) Delete(ctx context.Context, query interface{}, args ...interface{}) int64

func (*Postgres) Exec

func (t *Postgres) Exec(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*Postgres) Exists

func (t *Postgres) Exists(ctx context.Context, query interface{}, args ...interface{}) bool

func (*Postgres) Find

func (t *Postgres) Find(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*Postgres) FindOne

func (t *Postgres) FindOne(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*Postgres) GetDb

func (t *Postgres) GetDb() interface{}

func (*Postgres) Init

func (t *Postgres) Init(app interfaces.IService) error

func (*Postgres) Stop

func (t *Postgres) Stop() error

func (*Postgres) String

func (t *Postgres) String() string

func (*Postgres) Update

func (t *Postgres) Update(ctx context.Context, query interface{}, args ...interface{}) error

type Sqlite3

type Sqlite3 struct {
	Name     string
	Database string
	// contains filtered or unexported fields
}

func (*Sqlite3) Count

func (t *Sqlite3) Count(ctx context.Context, query interface{}, args ...interface{}) int64

func (*Sqlite3) Delete

func (t *Sqlite3) Delete(ctx context.Context, query interface{}, args ...interface{}) int64

func (*Sqlite3) Exec

func (t *Sqlite3) Exec(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*Sqlite3) Exists

func (t *Sqlite3) Exists(ctx context.Context, query interface{}, args ...interface{}) bool

func (*Sqlite3) Find

func (t *Sqlite3) Find(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*Sqlite3) FindOne

func (t *Sqlite3) FindOne(ctx context.Context, query interface{}, model interface{}, args ...interface{}) error

func (*Sqlite3) GetDb

func (t *Sqlite3) GetDb() interface{}

func (*Sqlite3) Init

func (t *Sqlite3) Init(app interfaces.IService) error

func (*Sqlite3) Stop

func (t *Sqlite3) Stop() error

func (*Sqlite3) String

func (t *Sqlite3) String() string

func (*Sqlite3) Update

func (t *Sqlite3) Update(ctx context.Context, query interface{}, args ...interface{}) error

Jump to

Keyboard shortcuts

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