db

package
v0.0.0-...-c6be4de Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fields

func Fields(entity interface{}) map[string]interface{}

func SetID

func SetID(id ID, entity interface{})

func TableName

func TableName(entity interface{}) string

Types

type Base

type Base interface {
	One(id ID, entity interface{}) error
	List(list interface{}, options ...Options) error
	Create(entity interface{}) error
	Patch(table string, id ID, fields map[string]interface{}) error
	Delete(table string, id ID) error
}

type ID

type ID string

func IDp

func IDp(s string) *ID

type Options

type Options struct {
	View   string      // view for records filter
	Filter interface{} // entity obj with not zero values filter fields
}

type TableNamer

type TableNamer interface {
	TableName() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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