database

package
v0.0.0-...-14d50ed Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(log log.ILog, settings settings.ISettings) (err error)

Connect to the database

func GetAllResults

func GetAllResults(surveyID string) (results []models.Result, err error)

GetAllResults gets all the results for a given survey

func GetResults

func GetResults(surveyID string, questionID string) (results []models.Result, err error)

GetResults gets the results for a given survey and question

func GetSubmitCount

func GetSubmitCount(surveyID string) (count int)

GetSubmitCount Gets the survey submit count

func GetSurvey

func GetSurvey(surveyID string) (*models.Survey, error)

GetSurvey gets a survey given the survey id

func IncrementResult

func IncrementResult(surveyID string, questionID string, answer string) (err error)

IncrementResult increments a survey answer count

func IncrementSubmitCount

func IncrementSubmitCount(surveyID string) (err error)

IncrementSubmitCount increments the survey submit count

Types

This section is empty.

Jump to

Keyboard shortcuts

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