insert

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoQuery = errors.New("query statement is empty")

Functions

func Prods added in v1.7.0

func Prods(p *releases.Productions, quiet bool) error

Prods adds the Demozoo releasers productions to the database. API: https://demozoo.org/api/v1/releasers/ Except for errors, setting quiet to false disables all stdout feedback.

Types

type Record

type Record struct {
	WebIDDemozoo uint   // Demozoo production id
	ID           string // MySQL auto increment id
	UUID         string // record unique id
	Title        string
	Platform     string
	Section      string
	GroupFor     string
	GroupBy      string
	CreditText   []string
	CreditCode   []string
	CreditArt    []string
	CreditAudio  []string
	IssuedYear   uint16
	IssuedMonth  uint8
	IssuedDay    uint8
}

Record contains the values for a new Demozoo releaser production to be added to the database file table.

func Prod added in v1.7.0

func Prod(prod releases.ProductionV1, quiet bool) Record

Prod mutates the raw Demozoo API releaser production data to database ready values. Except for errors, setting quiet to false disables all stdout feedback.

func (*Record) Insert

func (r *Record) Insert() (sql.Result, error)

Insert the new Demozoo releaser production into the database.

Jump to

Keyboard shortcuts

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