squaresql

package module
v0.0.0-...-258ddb4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 9 Imported by: 0

README

squaresql

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execer

type Execer interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
}

Execer is an interface used by Exec.

type ExecerContext

type ExecerContext interface {
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
}

ExecerContext is an interface used by ExecContext.

type Preparer

type Preparer interface {
	Prepare(query string) (*sql.Stmt, error)
}

Preparer is an interface used by Prepare.

type PreparerContext

type PreparerContext interface {
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
}

PreparerContext is an interface used by PrepareContext.

type QueryRower

type QueryRower interface {
	QueryRow(query string, args ...interface{}) *sql.Row
}

QueryRower is an interface used by QueryRow.

type QueryRowerContext

type QueryRowerContext interface {
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}

QueryRowerContext is an interface used by QueryRowContext.

type Queryer

type Queryer interface {
	Query(query string, args ...interface{}) (*sql.Rows, error)
}

Queryer is an interface used by Query.

type QueryerContext

type QueryerContext interface {
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
}

QueryerContext is an interface used by QueryContext.

type Scanner

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

func (*Scanner) Run

func (s *Scanner) Run(io *bufio.Scanner) map[string]string

type SquareSql

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

func Load

func Load(r io.Reader) (*SquareSql, error)

func LoadFromFile

func LoadFromFile(sqlFile string) (*SquareSql, error)

func LoadFromString

func LoadFromString(sql string) (*SquareSql, error)

func Merge

func Merge(dots ...*SquareSql) *SquareSql

func (*SquareSql) Exec

func (s *SquareSql) Exec(db Execer, name string, args ...interface{}) (sql.Result, error)

func (*SquareSql) ExecContext

func (s *SquareSql) ExecContext(ctx context.Context, db ExecerContext, name string, args ...interface{}) (sql.Result, error)

func (*SquareSql) Prepare

func (s *SquareSql) Prepare(db Preparer, name string) (*sql.Stmt, error)

func (*SquareSql) PrepareContext

func (s *SquareSql) PrepareContext(ctx context.Context, db PreparerContext, name string) (*sql.Stmt, error)

func (*SquareSql) Query

func (s *SquareSql) Query(db Queryer, name string, args ...interface{}) (*sql.Rows, error)

func (*SquareSql) QueryContext

func (s *SquareSql) QueryContext(ctx context.Context, db QueryerContext, name string, args ...interface{}) (*sql.Rows, error)

func (*SquareSql) QueryMap

func (s *SquareSql) QueryMap() map[string]string

func (*SquareSql) QueryRow

func (s *SquareSql) QueryRow(db QueryRower, name string, args ...interface{}) (*sql.Row, error)

func (*SquareSql) QueryRowContext

func (s *SquareSql) QueryRowContext(ctx context.Context, db QueryRowerContext, name string, args ...interface{}) (*sql.Row, error)

func (*SquareSql) Raw

func (s *SquareSql) Raw(name string) (string, error)

Jump to

Keyboard shortcuts

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