queries

package
v0.0.0-...-92a1ef8 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB

Functions

func DeleteQuestion

func DeleteQuestion(db *sql.DB, no int64) error

DeleteQuestion deletes the question with the given no from the table questions

func GetQuestion

func GetQuestion(db *sql.DB, no int64) ([]models.Question, error)

GetQuestion returns the question with the given no from the table questions

func GetQuestions

func GetQuestions(db *sql.DB) ([]models.Question, error)

GetQuestions returns all questions from the table questions

func InitTableQuestions

func InitTableQuestions() (*sql.DB, error)

InitTableQuestions initializes the table questions

func IsQuestionNoExists

func IsQuestionNoExists(dbCon *sql.DB, no int64) bool

IsQuestionNoExists returns true if the question with the given no exists in the table questions

func PutQuestion

func PutQuestion(db *sql.DB, p models.Question) error

PutQuestion upserts question into the table questions

Types

This section is empty.

Jump to

Keyboard shortcuts

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