db

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDB

type IDB interface {
	Object(objectApiName string) IObject
}

type IObject

type IObject interface {
	// create
	Create(record interface{}) (*structs.RecordOnlyId, error)

	// update
	UpdateById(_id int64, record interface{}) error

	// delete
	DeleteById(_id int64) error

	// query
	Find(records interface{}) error
	FindOne(record interface{}) error

	// query related
	Where(condition interface{}) IQuery
	Offset(offset int64) IQuery
	Limit(limit int64) IQuery
	OrderBy(fieldApiNames ...string) IQuery
	OrderByDesc(fieldApiNames ...string) IQuery
	Select(fieldApiNames ...string) IQuery
}

type IQuery

type IQuery interface {
	// query
	Find(records interface{}) error
	FindOne(record interface{}) error

	// query related
	Where(condition interface{}) IQuery
	Offset(offset int64) IQuery
	Limit(limit int64) IQuery
	OrderBy(fieldApiNames ...string) IQuery
	OrderByDesc(fieldApiNames ...string) IQuery
	Select(fieldApiNames ...string) IQuery
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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