database

package
v0.0.0-...-452a94c Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package database exposes the postgres database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNullInt64

func NewNullInt64(i int64) sql.NullInt64

func NewNullString

func NewNullString(s string) sql.NullString

func NewNullTime

func NewNullTime(t time.Time) sql.NullTime

NewNullTime returns a sql.NullTime with the given time.Time. If the time is the zero value, the NullTime is invalid.

Types

type DatabaseService

type DatabaseService struct {
	DB *sqlx.DB
}

func NewDatabaseService

func NewDatabaseService(dsn string) (*DatabaseService, error)

func (*DatabaseService) Close

func (s *DatabaseService) Close() error

func (*DatabaseService) SomeQuery

func (s *DatabaseService) SomeQuery() (count uint64, err error)

Directories

Path Synopsis
Package migrations contains all the migration files
Package migrations contains all the migration files
Package vars contains the database variables such as dynamic table names
Package vars contains the database variables such as dynamic table names

Jump to

Keyboard shortcuts

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