sqlopt

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 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 LikeTag added in v0.1.6

func LikeTag(tag string) SQLOption

func WithDelete

func WithDelete(deleted int) SQLOption

func WithDocID added in v0.1.6

func WithDocID(id string) 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 WithImportIDs added in v0.2.3

func WithImportIDs(idList []string) SQLOption

func WithKey added in v0.2.4

func WithKey(key string) SQLOption

func WithKnowledgeID

func WithKnowledgeID(id string) SQLOption

func WithKnowledgeIDList added in v0.1.3

func WithKnowledgeIDList(idList []string) SQLOption

func WithMetaId added in v0.2.3

func WithMetaId(metaId string) SQLOption

func WithMetaIds added in v0.2.3

func WithMetaIds(metaIds []string) SQLOption

func WithName

func WithName(name string) SQLOption

func WithNameOrAliasLike added in v0.1.4

func WithNameOrAliasLike(name string) SQLOption

func WithNameOrValue added in v0.1.7

func WithNameOrValue(name, value string) SQLOption

func WithNonEmptyValue added in v0.2.4

func WithNonEmptyValue() SQLOption

func WithOrgID

func WithOrgID(orgID string) SQLOption

func WithOverKnowledgePermission added in v0.2.5

func WithOverKnowledgePermission(id int) SQLOption

func WithPermissionId added in v0.2.5

func WithPermissionId(id string) SQLOption

func WithPermit

func WithPermit(orgID, userID string) SQLOption

WithPermit 权限查询条件

func WithSplitterID added in v0.1.6

func WithSplitterID(id string) SQLOption

func WithStatusList

func WithStatusList(status []int) SQLOption

func WithTagID added in v0.1.3

func WithTagID(id string) SQLOption

func WithType added in v0.2.4

func WithType(metaValueType string) SQLOption

func WithUserID

func WithUserID(userID string) SQLOption

func WithValue added in v0.1.7

func WithValue(value string) SQLOption

func WithoutID added in v0.2.5

func WithoutID(id uint32) SQLOption

func WithoutKnowledgeID added in v0.2.0

func WithoutKnowledgeID(knowledgeId 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