db

package
v0.0.0-...-0d47d07 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Memory = ":memory:?_foreign_keys=1"

Variables

This section is empty.

Functions

func NewDB

func NewDB(ctx context.Context, dataSourceName string) (*sqlx.DB, error)

Types

type CountryTable

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

func NewCountryTable

func NewCountryTable(db *sqlx.DB) *CountryTable

func (*CountryTable) UpdateDetail

func (c *CountryTable) UpdateDetail(ctx context.Context, detail extract.Detail) error

func (*CountryTable) UpsertCountry

func (c *CountryTable) UpsertCountry(ctx context.Context, alpha2Code, englishShortName string) error

type LanguageTable

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

func NewLanguageTable

func NewLanguageTable(db *sqlx.DB) *LanguageTable

func (*LanguageTable) SetLocalShortName

func (t *LanguageTable) SetLocalShortName(ctx context.Context, countryCode, languageCode, localShortName string) error

func (*LanguageTable) UpsertLanguage

func (t *LanguageTable) UpsertLanguage(ctx context.Context, lang extract.Language) error

type SubdivisionTable

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

func NewSubdivisionTable

func NewSubdivisionTable(db *sqlx.DB) *SubdivisionTable

func (*SubdivisionTable) UpsertSubdivision

func (t *SubdivisionTable) UpsertSubdivision(ctx context.Context, subdivision extract.Subdivision) error

Jump to

Keyboard shortcuts

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