sqlopt

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLOption

type SQLOption interface {
	Apply(db *gorm.DB) *gorm.DB
}

func LikeName

func LikeName(name string) SQLOption

func WithDelete

func WithDelete(deleted int) SQLOption

func WithDocIDs

func WithDocIDs(ids []string) SQLOption

func WithFilePathMd5

func WithFilePathMd5(filePathMd5 string) SQLOption

func WithID

func WithID(id uint32) SQLOption

func WithIDs

func WithIDs(ids []uint32) SQLOption

func WithImportID

func WithImportID(id string) SQLOption

func WithKnowledgeID

func WithKnowledgeID(id string) SQLOption

func WithName

func WithName(name string) SQLOption

func WithOrgID

func WithOrgID(orgID string) SQLOption

func WithPermit

func WithPermit(orgID, userID string) SQLOption

WithPermit 权限查询条件

func WithStatusList

func WithStatusList(status []int) SQLOption

func WithUserID

func WithUserID(userID string) SQLOption

func WithoutStatus

func WithoutStatus(status int) SQLOption

type SqlOptions

type SqlOptions []SQLOption

func SQLOptions

func SQLOptions(opts ...SQLOption) SqlOptions

func (SqlOptions) Apply

func (s SqlOptions) Apply(db *gorm.DB, model interface{}) *gorm.DB

Jump to

Keyboard shortcuts

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