querybuilder

package
v0.4.74 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInsertQuery

func BuildInsertQuery(
	logger *slog.Logger,
	driver, schema, table string,
	columns []string,
	columnDataTypes []string,
	values [][]any,
	onConflictDoNothing *bool,
	columnDefaultProperties []*neosync_benthos.ColumnDefaultProperties,
) (sql string, args []any, err error)

func BuildSelectLimitQuery added in v0.4.31

func BuildSelectLimitQuery(
	driver, table string,
	limit uint,
) (string, error)

func BuildSelectQuery

func BuildSelectQuery(
	driver, table string,
	columns []string,
	whereClause *string,
) (string, error)

func BuildTruncateQuery

func BuildTruncateQuery(
	driver, table string,
) (string, error)

func BuildUpdateQuery

func BuildUpdateQuery(
	driver, schema, table string,
	insertColumns []string,
	whereColumns []string,
	columnValueMap map[string]any,
) (string, error)

Types

type SubsetColumnConstraint

type SubsetColumnConstraint struct {
	Columns     []string
	NotNullable []bool
	ForeignKey  *SubsetReferenceKey
}

type SubsetReferenceKey

type SubsetReferenceKey struct {
	Table         string
	Columns       []string
	OriginalTable *string
}

Jump to

Keyboard shortcuts

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