storage

package
v0.0.0-...-1e20926 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenMongoDB

func OpenMongoDB() *mgo.Database

OpenMongoDB 打开 MongoDB

func OpenPostgreSQL

func OpenPostgreSQL() *sql.DB

OpenPostgreSQL 打开 PostgreSQL

Types

type Adapter

type Adapter interface {
	ClassExists(name string) bool
	SetClassLevelPermissions(className string, CLPs types.M) error
	CreateClass(className string, schema types.M) (types.M, error)
	AddFieldIfNotExists(className, fieldName string, fieldType types.M) error
	DeleteClass(className string) (types.M, error)
	DeleteAllClasses() error
	DeleteFields(className string, schema types.M, fieldNames []string) error
	CreateObject(className string, schema, object types.M) error
	GetAllClasses() ([]types.M, error)
	GetClass(className string) (types.M, error)
	DeleteObjectsByQuery(className string, schema, query types.M) error
	Find(className string, schema, query, options types.M) ([]types.M, error)
	Count(className string, schema, query types.M) (int, error)
	UpdateObjectsByQuery(className string, schema, query, update types.M) error
	FindOneAndUpdate(className string, schema, query, update types.M) (types.M, error)
	UpsertOneObject(className string, schema, query, update types.M) error
	EnsureUniqueness(className string, schema types.M, fieldNames []string) error
	PerformInitialization(options types.M) error
	HandleShutdown()
}

Adapter 数据库操作适配器接口

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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