database

package module
v0.0.0-...-b1940d6 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 9 Imported by: 0

README

banners.database

Support repository for Go and Echo experimentation

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BannersSchema = "" /* 320-byte string literal not displayed */
View Source
var ConnectionString = "Server=SERVER_NAME;Database=DATABASE_NAME;Trusted_Connection=True;"
View Source
var DestroyBannerTable = "IF OBJECT_ID('dbo.banners', 'U') IS NOT NULL DROP TABLE dbo.banners"
View Source
var DestroyZonesTable = "IF OBJECT_ID('dbo.zones', 'U') IS NOT NULL DROP TABLE dbo.zones"
View Source
var ExecuteStoreProcedure = "EXEC cms.spGetBanners @LanguageCode, @PageId, @DeviceTypeId, @ErrorMessage OUTPUT;"
View Source
var StoredProcedureQuery = `` /* 763-byte string literal not displayed */
View Source
var ZonesSchema = "CREATE TABLE zones(id INT, deviceId INT, pageId INT, languageCode NVARCHAR(50), width INT, height INT)"

Functions

func GetBannersByZoneId

func GetBannersByZoneId(banners []domain.Banner, zoneId int) []domain.Banner

func GetZonesIdsFromBanners

func GetZonesIdsFromBanners(banners []domain.Banner) []int

func InitializeTables

func InitializeTables(connection sqlx.DB)

func PopulateBanners

func PopulateBanners(connection sqlx.DB)

func PopulateZones

func PopulateZones(connection sqlx.DB)

func Seed

func Seed()

func SelectBanners

func SelectBanners(language string, pageId int, deviceId int) []domain.Banner

func SelectZone

func SelectZone(zoneId int) domain.Zone

func SelectZones

func SelectZones(banners []domain.Banner) []domain.Zone

Types

This section is empty.

Jump to

Keyboard shortcuts

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