sql

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	BeginTx() (Engine, error)
	Commit() error
	Rollback() error

	Table(name string) Engine

	ID(id any) Engine
	In(col string, values ...any) Engine
	Where(cond string, args ...any) Engine
	Columns(cols ...string) Engine
	AllCols() Engine
	MustCols(cols ...string) Engine
	ShowSQL(showSQL bool) Engine

	FindOne(document any, filter ...any) (bool, error)
	FindMany(documents any, filter ...any) error

	InsertOne(document any) (id any, err error)
	InsertMany(documents []any) ([]any, error)

	UpdateOne(document any) error

	DeleteOne(filter ...any) error

	Query(query string, args ...any) (*sql.Rows, error)
	Exec(query string, args ...any) (sql.Result, error)

	Sync(tables ...any) error

	Close() error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
lib
lib

Jump to

Keyboard shortcuts

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