db

package
v0.0.0-...-76532a6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appointment

type Appointment struct {
	ID        time.Time      `json:"id"`
	Comment   sql.NullString `json:"comment"`
	PatientID string         `json:"patient_id"`
	DoctorID  uuid.UUID      `json:"doctor_id"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Querier

type Querier interface {
	GetAppointment(ctx context.Context, patientID string) (Appointment, error)
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) GetAppointment

func (q *Queries) GetAppointment(ctx context.Context, patientID string) (Appointment, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

Jump to

Keyboard shortcuts

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