queries

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package queries provides a set of SQL queries based on the driver

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownDriver = errors.New("unknown driver")

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(driver string) *Builder

func (*Builder) CheckTableExitsQuery

func (b *Builder) CheckTableExitsQuery(tableName string) (string, []any, error)

func (*Builder) ColumnsList

func (b *Builder) ColumnsList(tableName string) (string, []any, error)

func (*Builder) CreateTable

func (b *Builder) CreateTable(tableName string, inputs []database.Input) (string, error)

func (*Builder) DeleteRow

func (b *Builder) DeleteRow(tableName string, columns []models.ListDataCol, rows []any, argIdx int) (string, []any, error)

func (*Builder) DeleteTable

func (b *Builder) DeleteTable(tableName string) string

func (*Builder) GetRow

func (b *Builder) GetRow(tableName string, limit, offset int) (string, []any)

func (*Builder) InsertRow

func (b *Builder) InsertRow(tableName string, form map[string]models.FormValue) (string, []any, error)

func (*Builder) ListRows

func (b *Builder) ListRows(tableName, orderCol, orderBy string, limit, offset int) (string, []any)

func (*Builder) ListTables

func (b *Builder) ListTables() (string, error)

func (*Builder) UpdateRow

func (b *Builder) UpdateRow(tableName string, form map[string]models.FormValue, columns []models.ListDataCol, row []any) (string, []any, error)

func (*Builder) WhereCluse

func (b *Builder) WhereCluse(cols []models.ListDataCol, rows []any, argsIdx int) (string, []any, error)

Jump to

Keyboard shortcuts

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