backend

package
v0.0.0-...-7c7d171 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INSERT_INTO_CINEMA = `` /* 214-byte string literal not displayed */

	INSER_INTO_IMDB_FILM = `` /* 414-byte string literal not displayed */

	INSERT_INTO_FILM_NOT_NULL_IMDBID = `` /* 242-byte string literal not displayed */

	INSERT_INTO_FILM_NULL_IMDBID = `` /* 243-byte string literal not displayed */

	INSERT_INTO_SCREENING = `` /* 258-byte string literal not displayed */

	INSERT_INTO_TICKET = `` /* 143-byte string literal not displayed */

	GET_CINEMA_BY_SHORT_NAME = `
		select id from cinema where cinema.shortName = $1;
	`

	CHECK_NEED_UPDATE_IMDB_FILM = `
		select id from imdbFilm where id = $1 and DATE_PART('day', now() - lastUpdate) < 7;
	`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func New

func New(dbURN string, imdbClient *jsonapi.Client) (*Backend, error)

func (*Backend) DropDB

func (b *Backend) DropDB() error

func (*Backend) Fill

func (b *Backend) Fill(data *spiderdata.Request) error

func (*Backend) Foo

func (b *Backend) Foo() (string, error)

func (*Backend) InitDB

func (b *Backend) InitDB() error

func (*Backend) Wrap

func (b *Backend) Wrap(f func(tx *sqlx.Tx) (interface{}, error)) (data interface{}, err error)

Wrap wraps a function with queries to the database in transaction

Jump to

Keyboard shortcuts

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