session

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func Q

func Q(db *sql.DB) *Session

New creates a instance of Session

func (*Session) Clear

func (s *Session) Clear()

Clear initialize the state of a session

func (*Session) DB

func (s *Session) DB() *sql.DB

func (*Session) Exec

func (s *Session) Exec(query string, args ...interface{}) (result sql.Result, err error)

func (*Session) Find

func (s *Session) Find(values interface{}) error

Find gets all eligible records

func (*Session) QueryRow

func (s *Session) QueryRow() *sql.Row

QueryRow gets a record from db

func (*Session) QueryRows

func (s *Session) QueryRows() (rows *sql.Rows, err error)

QueryRows gets a list of records from db

func (*Session) Raw

func (s *Session) Raw(sql string, values ...interface{}) *Session

Raw appends sql and sqlVars

Jump to

Keyboard shortcuts

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