squeel

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: BSD-3-Clause Imports: 2 Imported by: 1

README

squeel

Documentation

Overview

init.go squeel

Created by karim-w on 10/07/2025.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	// Inheritance, great ...
	Queryer

	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
	Close() error
	Conn(ctx context.Context) (*sql.Conn, error)
	PingContext(ctx context.Context) error
}

type Middleware

type Middleware func(
	statement *Statement,
)

type Pipeline

type Pipeline interface {
	Use(middleware ...Middleware)
	Queryer
}

func NewPipeline

func NewPipeline(
	queryer Queryer,
) Pipeline

type Queryer

type Queryer interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}

Queryer is an interface that defines methods for executing SQL queries. It includes methods for executing commands that do not return rows, querying multiple rows, and querying a single row. This interface is designed to be implemented by types that

type SQL_OPERATION

type SQL_OPERATION int64

type Statement

type Statement struct {
	Query string
	Args  []any

	Rows   *sql.Rows
	Row    *sql.Row
	Result sql.Result
	// contains filtered or unexported fields
}

func (*Statement) Error

func (s *Statement) Error() error

func (*Statement) Next

func (s *Statement) Next()

func (*Statement) OperationType

func (s *Statement) OperationType() SQL_OPERATION

type Transaction

type Transaction interface {
	Queryer
	Commit() error
	Rollback() error
}

Jump to

Keyboard shortcuts

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