static

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package static holds one instance of each mistake the static analyzers report, and one correct use of each construct beside it.

Index

Constants

This section is empty.

Variables

View Source
var (
	Users = sqlb.Table{Name: "users", Alias: "u"}
	ID    = sqlb.Col[int64](Users, "id")
	Name  = sqlb.Col[string](Users, "name")
	Posts = sqlb.Table{Name: "posts", Alias: "p"}
	PUser = sqlb.Col[int64](Posts, "user_id")
)

Users and Posts are the tables the probe's statements are written against.

Functions

func DynamicColumn

func DynamicColumn(name string) sqlb.Expr[string]

DynamicColumn is a Col whose name came from outside.

func JoinFullOuter

func JoinFullOuter() *pg.SelectQuery

JoinFullOuter is a keyword the constants omit that both engines have.

func JoinNatural

func JoinNatural() *pg.SelectQuery

JoinNatural is refused everywhere, even where the engine has it.

func JoinOtherEngineSpelling

func JoinOtherEngineSpelling() *pg.SelectQuery

JoinOtherEngineSpelling is T-SQL's spelling of LATERAL.

func LiteralConstant

func LiteralConstant() sqlb.Expr[string]

LiteralConstant is what Literal is for.

func LiteralFromVariable

func LiteralFromVariable(s string) sqlb.Expr[string]

LiteralFromVariable is interpolation: the text came from a variable.

func QueryLiteral

func QueryLiteral() sqlb.Query

QueryLiteral builds a Query without its constructor.

func RowArity

func RowArity() sqlb.Predicate

RowArity compares a pair against a triple.

func RowRight

func RowRight() sqlb.Predicate

RowRight lines up.

func RowTypes

func RowTypes() sqlb.Predicate

RowTypes compares an int64 column against a string value.

func SetOpPostgresHas

func SetOpPostgresHas() *pg.SelectQuery

SetOpPostgresHas is the same keyword on Postgres, which accepts it.

func SetOpSQLiteLacks

func SetOpSQLiteLacks() *sqlite.SelectQuery

SetOpSQLiteLacks is INTERSECT ALL on a statement fixed to SQLite.

func StructLiteral

func StructLiteral() *sqlb.FilteredUpdate[sqlb.PostgresDialect]

StructLiteral builds an Update without its constructor.

Types

This section is empty.

Jump to

Keyboard shortcuts

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