database

package
v0.0.0-...-1422b68 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTodo

func AddTodo(db *sqlx.DB, ctx context.Context, tb *TableTodos) error

func BoostrapDatabase

func BoostrapDatabase(cfg *config.EnvParams) (*sqlx.DB, error)

func CloseDatabase

func CloseDatabase(db *sqlx.DB) error

Types

type TableTodos

type TableTodos struct {
	ID              string `db:"id"`
	Title           string `db:"title"`
	Detail          string `db:"detail"`
	CreatedDate     string `db:"created_date"`
	UpdatedDate     string `db:"updated_date"`
	StatusCompleted string `db:"st_completed"`
	CompletedDate   string `db:"completed_date"`
}

func ListTodo

func ListTodo(db *sqlx.DB, ctx context.Context, id string) ([]*TableTodos, error)

Jump to

Keyboard shortcuts

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