sqlhelpers

package
v0.0.0-...-970753e Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const Placeholder = sqlgen.Literal("?")

Placeholder is a placeholder literal

Variables

This section is empty.

Functions

func Hole

func Hole(name string) *sqlgen.Hole

func J

func J(join string, sqls ...sqlgen.SQL) sqlgen.SQL

J constructs a SQL by joining the given sqls with the string.

func L

func L(sql string) sqlgen.SQL

L constructs a Literal

func Lf

func Lf(sqlf string, args ...any) sqlgen.SQL

Lf constructs a literal from a format string

func Placeholders

func Placeholders(n int) (out []sqlgen.SQL)

Placeholders returns a slice of placeholder literals of the right size.

func Strings

func Strings(parts []string) (out []sqlgen.SQL)

Strings turns a slice of strings into a slice of Literal.

Types

type Builder

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

func Build

func Build(sql sqlgen.SQL) *Builder

func (*Builder) Add

func (b *Builder) Add(sqls ...sqlgen.SQL)

func (*Builder) SQL

func (b *Builder) SQL() sqlgen.SQL

Jump to

Keyboard shortcuts

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