bob

package module
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SoftDeletes = &selects.Scope{
	Name: "soft-deletes",
	Apply: func(b *selects.SubBuilder) *selects.SubBuilder {
		return b.Where("deleted_at", "=", nil)
	},
}

Functions

func From

func From[T models.Model]() *selects.Builder[T]

func InitializeRelationships added in v0.11.4

func InitializeRelationships(v any) error

func Load added in v0.11.4

func Load(tx *sqlx.Tx, v any, relation string) error

func New

func New[T models.Model]() *selects.Builder[T]

func NewEmpty

func NewEmpty[T models.Model]() *selects.Builder[T]

func Save

func Save(tx *sqlx.Tx, v models.Model) error

func SaveContext

func SaveContext(ctx context.Context, tx *sqlx.Tx, v models.Model) error

Types

type BaseModel

type BaseModel = models.BaseModel

type Model

type Model = models.Model

type Scope added in v0.9.1

type Scope = selects.Scope

type ScopeFunc added in v0.9.1

type ScopeFunc = selects.ScopeFunc

type Scoper added in v0.9.1

type Scoper = selects.Scoper

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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