sqlx

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Charset

func Charset(elements []schema.Attr) (string, bool)

func Collation

func Collation(elements []schema.Attr) (string, bool)

func ColumnNames

func ColumnNames(columns []*schema.Column) []string

func Comment

func Comment(elements []schema.Attr) (string, bool)

func DefaultValue

func DefaultValue(c *schema.Column) (string, bool)

DefaultValue returns the string represents the DEFAULT of a column.

func FindColumn

func FindColumn(columns []*schema.Column, columnName string) (*schema.Column, bool)

func FindIndexPartSeq

func FindIndexPartSeq(parts []*schema.IndexPart, col *schema.Column) (int, bool)

func Has

func Has(elements, target any) bool

Has finds the first element in the elements list that matches target, and if so, sets target to that attribute value and returns true. support schema.Attr, schema.Clause, schema.Expr

func IndexEqual

func IndexEqual(idx1, idx2 *schema.Index) bool

func IndexPartColumnNames

func IndexPartColumnNames(parts []*schema.IndexPart) []string

func MustComment

func MustComment(elements []schema.Attr) string

func P

func P[T any](v T) *T

P returns a pointer to v.

func V

func V[T any](p *T) (v T)

V returns the value p is pointing to. If p is nil, the zero value is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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