common

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountBooks

func CountBooks(t *testing.T, db *godb.DB) int64

func RawSQLTests added in v1.0.7

func RawSQLTests(db *godb.DB, t *testing.T)

func StatementsTests

func StatementsTests(db *godb.DB, t *testing.T)

func StructsTests

func StructsTests(db *godb.DB, t *testing.T)

Types

type Book

type Book struct {
	Id        int       `db:"id,key,auto"`
	Title     string    `db:"title"`
	Author    string    `db:"author"`
	Published time.Time `db:"published"`
	Version   int       `db:"version,oplock"`
}

func (*Book) TableName

func (*Book) TableName() string

type BooksWithInventories added in v1.0.6

type BooksWithInventories struct {
	Book          `db:",rel=books"`
	InventoryPart `db:",rel=inventories"`
}

type CountByAuthor

type CountByAuthor struct {
	Author string `db:"author"`
	Count  int    `db:"count"`
}

type Inventory added in v1.0.6

type Inventory struct {
	Id            int       `db:"id,key,auto"`
	BookId        int       `db:"book_id"`
	LastInventory time.Time `db:"last_inventory"`
	Counting      int       `db:"counting"`
}

func (*Inventory) TableName added in v1.0.6

func (*Inventory) TableName() string

type InventoryPart added in v1.0.6

type InventoryPart struct {
	Id       sql.NullInt64 `db:"id"`
	Counting sql.NullInt64 `db:"counting"`
}

Jump to

Keyboard shortcuts

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