database

package
v0.0.0-...-5c5c951 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const IteratorLimit = 1000

Variables

This section is empty.

Functions

func GetMigration

func GetMigration() *gormigrate.Gormigrate

func Migrate

func Migrate()

func SetupDatabaseForTest

func SetupDatabaseForTest() func()

SetupDatabaseForTest setups a in-memory db for testing purpose. Shouldn't be called out of test.

Types

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator(query *gorm.DB, bunch interface{}, limit ...int) (it *Iterator, err error)

func (*Iterator) Index

func (it *Iterator) Index() int

func (*Iterator) Next

func (it *Iterator) Next() (ok bool, err error)

type StringArray

type StringArray []string

StringArray represents a one-dimensional array of string. stolen from lib/pq. with a bit modification.

func (*StringArray) Scan

func (a *StringArray) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (StringArray) Value

func (a StringArray) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

Directories

Path Synopsis
log

Jump to

Keyboard shortcuts

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