queries

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 12 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 configs.Driver, maxLimit int) *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) GetRows added in v0.1.4

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

func (*Builder) InsertRow

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

func (*Builder) ListRows

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

func (*Builder) ListTables

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

func (*Builder) UpdateRow

func (b *Builder) UpdateRow(tableName string, form []models.RowItem, 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