models

package
v0.0.0-...-3473e7d Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, e string) (bool, int)

* Contains em um ARRAY

Types

type AbstractModel

type AbstractModel struct {
	Object interface{}
	DB     *sql.DB
}

func (AbstractModel) All

func (a AbstractModel) All(table string, pagination Pagination) (*sql.Rows, error)

func (AbstractModel) Count

func (a AbstractModel) Count(table string) (int, error)

func (AbstractModel) Create

func (a AbstractModel) Create(table string) (sql.Result, error)

func (AbstractModel) Delete

func (a AbstractModel) Delete(table string, keys []string, values []string) (sql.Result, error)

func (AbstractModel) FindByKey

func (a AbstractModel) FindByKey(table string, conditions []string, keys []string, operations []string, values []string) (*sql.Rows, error)

func (AbstractModel) NextCode

func (a AbstractModel) NextCode(table string, pimaryKey string) (int, error)

func (AbstractModel) Update

func (a AbstractModel) Update(table string, keys []string) (sql.Result, error)

type Pagination

type Pagination struct {
	Page        int64
	MorePerPage int64
	Where       string
	GroupBy     string
	OrderBy     string
}

func MountPagination

func MountPagination(ctx iris.Context) Pagination

type ReturnAll

type ReturnAll struct {
	Data  interface{}
	Count int
}

Jump to

Keyboard shortcuts

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