ormopt

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Code generated by ormgen; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFromContext deprecated

func LoggerFromContext(ctx context.Context) *slog.Logger

Deprecated: Use ormcommon.LoggerFromContext instead.

func LoggerWithContext deprecated

func LoggerWithContext(ctx context.Context, logger *slog.Logger) context.Context

Deprecated: Use ormcommon.LoggerWithContext instead.

Types

type Condition

type Condition interface {
	// contains filtered or unexported methods
}

func And

func And(conditions ...Condition) Condition

func Between

func Between(column string, value1, value2 interface{}) Condition

func Equal

func Equal(column string, value interface{}) Condition

func GreaterThan

func GreaterThan(column string, value interface{}) Condition

func GreaterThanOrEqual

func GreaterThanOrEqual(column string, value interface{}) Condition

func In

func In(column string, values ...interface{}) Condition

func IsNotNull

func IsNotNull(column string) Condition

func IsNull

func IsNull(column string) Condition

func LessThan

func LessThan(column string, value interface{}) Condition

func LessThanOrEqual

func LessThanOrEqual(column string, value interface{}) Condition

func Like

func Like(column string, value interface{}) Condition

func NotBetween

func NotBetween(column string, value1, value2 interface{}) Condition

func NotEqual

func NotEqual(column string, value interface{}) Condition

func NotIn

func NotIn(column string, values ...interface{}) Condition

func NotLike

func NotLike(column string, value interface{}) Condition

func Or

func Or(conditions ...Condition) Condition

type PlaceholderGenerator

type PlaceholderGenerator func(placeholderStartAt int) string

type QueryConfig

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

func (*QueryConfig) ToSQL

func (c *QueryConfig) ToSQL(query string, placeholderStartAt int) (string, []interface{})

type QueryOption

type QueryOption interface {
	ApplyQueryOption(c *QueryConfig)
}

func Where

func Where(condition Condition) QueryOption

type QueryerContext deprecated

type QueryerContext interface {
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}

Deprecated: Use ormcommon.QueryerContext instead.

type ResultOption

type ResultOption interface {
	ApplyResultOption(c *QueryConfig)
	QueryOption
}

func Limit

func Limit(limit int) ResultOption

func OrderBy

func OrderBy(orderBy ...string) ResultOption

func OrderByDesc

func OrderByDesc(orderBy ...string) ResultOption

func QueryPrefix

func QueryPrefix(prefix string) ResultOption

func WithPlaceholderGenerator

func WithPlaceholderGenerator(f PlaceholderGenerator) ResultOption

Jump to

Keyboard shortcuts

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