access

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SoftDeleteColumn

func SoftDeleteColumn(table *schema.Table) *schema.Column

func WithContext

func WithContext(parent context.Context, value Context) context.Context

Types

type Context

type Context struct {
	UserID         any
	CompanyID      any
	TenantID       any
	OrganizationID any
	WorkspaceID    any
	WarehouseID    any
	Values         map[string]any
}

func FromContext

func FromContext(ctx context.Context) (Context, bool)

type Engine

type Engine struct{}

func NewEngine

func NewEngine() Engine

func (Engine) Apply

func (Engine) Apply(ctx context.Context, table *schema.Table, op Operation, values map[string]any) ([]Predicate, []FieldValue, error)

type FieldValue

type FieldValue struct {
	Field string
	Value any
}

type Operation

type Operation string
const (
	OpQuery  Operation = "query"
	OpInsert Operation = "insert"
	OpUpdate Operation = "update"
	OpDelete Operation = "delete"
)

type Predicate

type Predicate struct {
	SQL  string
	Args []any
}

Jump to

Keyboard shortcuts

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