db

package
v1.1.45 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-structify. DO NOT EDIT. source: example/case_click/db/blog.proto provider: clickhouse protoc-gen-structify: (version=v1.1.40, branch=main, revision=ffb0849c2be1dff73c0fa83e625b5688b56ab681), build: (go=go1.23.6, date=2025-10-09T11:22:00+0400) protoc: 3.16.0

Index

Constants

View Source
const (
	// Query execution settings
	SettingMaxThreads       = "max_threads"
	SettingMaxMemoryUsage   = "max_memory_usage"
	SettingMaxBytesToRead   = "max_bytes_to_read"
	SettingMaxExecutionTime = "max_execution_time"
	SettingMaxRowsToRead    = "max_rows_to_read"

	// Optimization settings
	SettingOptimizeReadInOrder  = "optimize_read_in_order"
	SettingForcePrimaryKey      = "force_primary_key"
	SettingUseUncompressedCache = "use_uncompressed_cache"
	SettingMaxColumnsToRead     = "max_columns_to_read"

	// MergeTree settings
	SettingMergeTreeMinRowsForConcurrentRead  = "merge_tree_min_rows_for_concurrent_read"
	SettingMergeTreeMinBytesForConcurrentRead = "merge_tree_min_bytes_for_concurrent_read"
	SettingMergeTreeCoarseIndexGranularity    = "merge_tree_coarse_index_granularity"

	// Load balancing settings
	SettingLoadBalancing = "load_balancing"

	// Distributed query settings
	SettingMaxParallelReplicas                   = "max_parallel_replicas"
	SettingDistributedAggregationMemoryEfficient = "distributed_aggregation_memory_efficient"

	// Insert settings
	SettingAsyncInsert        = "async_insert"
	SettingWaitForAsyncInsert = "wait_for_async_insert"
	SettingAsyncInsertThreads = "async_insert_threads"

	// Query result settings
	SettingMaxResultRows      = "max_result_rows"
	SettingMaxResultBytes     = "max_result_bytes"
	SettingResultOverflowMode = "result_overflow_mode"

	// Connection settings
	SettingConnectTimeout = "connect_timeout"
	SettingReceiveTimeout = "receive_timeout"
	SettingSendTimeout    = "send_timeout"

	// Additional optimization settings
	SettingOptimizeAggregationInOrder         = "optimize_aggregation_in_order"
	SettingOptimizeMoveToPrewhere             = "optimize_move_to_prewhere"
	SettingAllowSuspiciousLowCardinalityTypes = "allow_suspicious_low_cardinality_types"
)

ClickHouse query settings constants

Variables

View Source
var (
	// ErrNotFound is returned when a record is not found.
	ErrRowNotFound = fmt.Errorf("row not found")
	// ErrNoTransaction is returned when a transaction is not provided.
	ErrNoTransaction = fmt.Errorf("no transaction provided")
	// ErrRowAlreadyExist is returned when a row already exist.
	ErrRowAlreadyExist = fmt.Errorf("row already exist")
	// ErrModelIsNil is returned when a relation model is nil.
	ErrModelIsNil = fmt.Errorf("model is nil")
)

Functions

This section is empty.

Types

type Address

type Address struct {
	Id        string
	Street    string
	City      string
	State     int32
	Zip       int64
	User      *User
	UserId    string
	CreatedAt time.Time
	UpdatedAt *time.Time
}

Address is a struct for the "addresses" table.

func (*Address) ScanRow

func (t *Address) ScanRow(row driver.Row) error

ScanRow scans a row into a Address.

func (*Address) TableName

func (t *Address) TableName() string

TableName returns the table name.

type AddressCRUDOperations

type AddressCRUDOperations interface {
	Create(ctx context.Context, model *Address, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Address, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Address, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Address, opts ...Option) error
}

AddressCRUDOperations is an interface for managing the addresses table.

type AddressFilters

type AddressFilters struct {
	Id     *string
	UserId *string
}

AddressFilters is a struct that holds filters for Address.

type AddressRawQueryOperations

type AddressRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

AddressRawQueryOperations is an interface for executing raw queries.

type AddressRelationLoading

type AddressRelationLoading interface {
	LoadUser(ctx context.Context, model *Address, builders ...*QueryBuilder) error
	LoadBatchUser(ctx context.Context, items []*Address, builders ...*QueryBuilder) error
}

AddressRelationLoading is an interface for loading relations.

type AddressSearchOperations

type AddressSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Address, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Address, error)
}

AddressSearchOperations is an interface for searching the addresses table.

type AddressSettings

type AddressSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) AddressStorage
	SetQueryBuilder(builder sq.StatementBuilderType) AddressStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type AddressStorage

AddressStorage is a struct for the "addresses" table.

func NewAddressStorage

func NewAddressStorage(config *Config) (AddressStorage, error)

NewAddressStorage returns a new addressStorage.

type AndCondition

type AndCondition struct {
	Where []FilterApplier
}

And returns a condition that combines the given conditions with AND.

func (AndCondition) Apply

func (c AndCondition) Apply(query sq.SelectBuilder) sq.SelectBuilder

And returns a condition that combines the given conditions with AND.

func (AndCondition) ApplyDelete

func (c AndCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

And returns a condition that combines the given conditions with AND.

type BetweenCondition

type BetweenCondition struct {
	Field string
	Min   interface{}
	Max   interface{}
}

BetweenCondition

func (BetweenCondition) Apply

Apply applies the condition to the query.

func (BetweenCondition) ApplyDelete

func (c BetweenCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type BlogStorages

type BlogStorages interface {
	// GetDeviceStorage returns the DeviceStorage store.
	GetDeviceStorage() DeviceStorage
	// GetPostStorage returns the PostStorage store.
	GetPostStorage() PostStorage
	// GetMessageStorage returns the MessageStorage store.
	GetMessageStorage() MessageStorage
	// GetBotStorage returns the BotStorage store.
	GetBotStorage() BotStorage
	// GetBotViewStorage returns the BotViewStorage store.
	GetBotViewStorage() BotViewStorage
	// GetCommentStorage returns the CommentStorage store.
	GetCommentStorage() CommentStorage
	// GetUserStorage returns the UserStorage store.
	GetUserStorage() UserStorage
	// GetSettingStorage returns the SettingStorage store.
	GetSettingStorage() SettingStorage
	// GetAddressStorage returns the AddressStorage store.
	GetAddressStorage() AddressStorage
}

BlogStorages is the interface for the BlogStorages.

func NewBlogStorages

func NewBlogStorages(config *Config) (BlogStorages, error)

NewBlogStorages returns a new BlogStorages.

type Bot

type Bot struct {
	Id        string
	UserId    string
	Name      string
	Token     string
	IsPublish bool
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
	User      *User
}

Bot is a struct for the "bots" table.

func (*Bot) ScanRow

func (t *Bot) ScanRow(row driver.Row) error

ScanRow scans a row into a Bot.

func (*Bot) TableName

func (t *Bot) TableName() string

TableName returns the table name.

type BotCRUDOperations

type BotCRUDOperations interface {
	Create(ctx context.Context, model *Bot, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Bot, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Bot, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Bot, opts ...Option) error
}

BotCRUDOperations is an interface for managing the bots table.

type BotFilters

type BotFilters struct {
	Id        *string
	UserId    *string
	CreatedAt *time.Time
}

BotFilters is a struct that holds filters for Bot.

type BotRawQueryOperations

type BotRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

BotRawQueryOperations is an interface for executing raw queries.

type BotRelationLoading

type BotRelationLoading interface {
	LoadUser(ctx context.Context, model *Bot, builders ...*QueryBuilder) error
	LoadBatchUser(ctx context.Context, items []*Bot, builders ...*QueryBuilder) error
}

BotRelationLoading is an interface for loading relations.

type BotSearchOperations

type BotSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Bot, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Bot, error)
}

BotSearchOperations is an interface for searching the bots table.

type BotSettings

type BotSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) BotStorage
	SetQueryBuilder(builder sq.StatementBuilderType) BotStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type BotStorage

BotStorage is a struct for the "bots" table.

func NewBotStorage

func NewBotStorage(config *Config) (BotStorage, error)

NewBotStorage returns a new botStorage.

type BotView

type BotView struct {
	Id        string
	UserId    string
	Name      string
	Token     string
	IsPublish bool
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
	User      *User
}

BotView is a struct for the "bots_view" table.

func (*BotView) ScanRow

func (t *BotView) ScanRow(row driver.Row) error

ScanRow scans a row into a BotView.

func (*BotView) TableName

func (t *BotView) TableName() string

TableName returns the table name.

type BotViewCRUDOperations

type BotViewCRUDOperations interface {
	Create(ctx context.Context, model *BotView, opts ...Option) error
	AsyncCreate(ctx context.Context, model *BotView, opts ...Option) error
	BatchCreate(ctx context.Context, models []*BotView, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*BotView, opts ...Option) error
}

BotViewCRUDOperations is an interface for managing the bots_view table.

type BotViewFilters

type BotViewFilters struct {
	Id        *string
	UserId    *string
	CreatedAt *time.Time
}

BotViewFilters is a struct that holds filters for BotView.

type BotViewRawQueryOperations

type BotViewRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

BotViewRawQueryOperations is an interface for executing raw queries.

type BotViewRelationLoading

type BotViewRelationLoading interface {
	LoadUser(ctx context.Context, model *BotView, builders ...*QueryBuilder) error
	LoadBatchUser(ctx context.Context, items []*BotView, builders ...*QueryBuilder) error
}

BotViewRelationLoading is an interface for loading relations.

type BotViewSearchOperations

type BotViewSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*BotView, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*BotView, error)
}

BotViewSearchOperations is an interface for searching the bots_view table.

type BotViewSettings

type BotViewSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) BotViewStorage
	SetQueryBuilder(builder sq.StatementBuilderType) BotViewStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type BotViewStorage

BotViewStorage is a struct for the "bots_view" table.

func NewBotViewStorage

func NewBotViewStorage(config *Config) (BotViewStorage, error)

NewBotViewStorage returns a new botViewStorage.

type Comment added in v1.1.27

type Comment struct {
	Id        string
	UserId    string
	PostId    int32
	Text      string
	CreatedAt time.Time
	UpdatedAt *time.Time
	User      *User
	Post      *Post
}

Comment is a struct for the "comments" table.

func (*Comment) ScanRow added in v1.1.27

func (t *Comment) ScanRow(row driver.Row) error

ScanRow scans a row into a Comment.

func (*Comment) TableName added in v1.1.27

func (t *Comment) TableName() string

TableName returns the table name.

type CommentCRUDOperations added in v1.1.27

type CommentCRUDOperations interface {
	Create(ctx context.Context, model *Comment, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Comment, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Comment, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Comment, opts ...Option) error
}

CommentCRUDOperations is an interface for managing the comments table.

type CommentFilters added in v1.1.27

type CommentFilters struct {
	Id     *string
	UserId *string
	PostId *int32
}

CommentFilters is a struct that holds filters for Comment.

type CommentRawQueryOperations added in v1.1.27

type CommentRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

CommentRawQueryOperations is an interface for executing raw queries.

type CommentRelationLoading added in v1.1.27

type CommentRelationLoading interface {
	LoadUser(ctx context.Context, model *Comment, builders ...*QueryBuilder) error
	LoadPost(ctx context.Context, model *Comment, builders ...*QueryBuilder) error
	LoadBatchUser(ctx context.Context, items []*Comment, builders ...*QueryBuilder) error
	LoadBatchPost(ctx context.Context, items []*Comment, builders ...*QueryBuilder) error
}

CommentRelationLoading is an interface for loading relations.

type CommentSearchOperations added in v1.1.27

type CommentSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Comment, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Comment, error)
}

CommentSearchOperations is an interface for searching the comments table.

type CommentSettings added in v1.1.27

type CommentSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) CommentStorage
	SetQueryBuilder(builder sq.StatementBuilderType) CommentStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type CommentStorage added in v1.1.27

CommentStorage is a struct for the "comments" table.

func NewCommentStorage added in v1.1.27

func NewCommentStorage(config *Config) (CommentStorage, error)

NewCommentStorage returns a new commentStorage.

type Config

type Config struct {
	DB driver.Conn

	QueryLogMethod func(ctx context.Context, table string, query string, args ...interface{})
	ErrorLogMethod func(ctx context.Context, err error, message string)
}

configuration for the BlogStorages.

type CustomFilter

type CustomFilter interface {
	ApplyFilter(query sq.SelectBuilder, params any) sq.SelectBuilder
}

CustomFilter is a custom filter.

type Device

type Device struct {
	Name   string
	Value  string
	UserId string
}

Device is a struct for the "devices" table.

func (*Device) ScanRow

func (t *Device) ScanRow(row driver.Row) error

ScanRow scans a row into a Device.

func (*Device) TableName

func (t *Device) TableName() string

TableName returns the table name.

type DeviceCRUDOperations

type DeviceCRUDOperations interface {
	Create(ctx context.Context, model *Device, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Device, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Device, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Device, opts ...Option) error
}

DeviceCRUDOperations is an interface for managing the devices table.

type DeviceFilters

type DeviceFilters struct {
	UserId *string
}

DeviceFilters is a struct that holds filters for Device.

type DeviceRawQueryOperations

type DeviceRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

DeviceRawQueryOperations is an interface for executing raw queries.

type DeviceRelationLoading

type DeviceRelationLoading interface {
}

DeviceRelationLoading is an interface for loading relations.

type DeviceSearchOperations

type DeviceSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Device, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Device, error)
}

DeviceSearchOperations is an interface for searching the devices table.

type DeviceSettings

type DeviceSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) DeviceStorage
	SetQueryBuilder(builder sq.StatementBuilderType) DeviceStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type DeviceStorage

DeviceStorage is a struct for the "devices" table.

func NewDeviceStorage

func NewDeviceStorage(config *Config) (DeviceStorage, error)

NewDeviceStorage returns a new deviceStorage.

type EqualsCondition

type EqualsCondition struct {
	Field string
	Value interface{}
}

EqualsCondition equals condition.

func (EqualsCondition) Apply

Apply applies the condition to the query.

func (EqualsCondition) ApplyDelete

func (c EqualsCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

type FilterApplier

type FilterApplier interface {
	Apply(query sq.SelectBuilder) sq.SelectBuilder
	ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder
}

FilterApplier is a condition filters.

func AddressIdBetween

func AddressIdBetween(min, max string) FilterApplier

AddressIdBetween between condition.

func AddressIdEq

func AddressIdEq(value string) FilterApplier

AddressIdEq returns a condition that checks if the field equals the value.

func AddressIdGT

func AddressIdGT(value string) FilterApplier

AddressIdGT greaterThanCondition than condition.

func AddressIdGTE

func AddressIdGTE(value string) FilterApplier

AddressIdGTE greater than or equal condition.

func AddressIdILike

func AddressIdILike(value string) FilterApplier

AddressIdILike iLike condition %

func AddressIdIn

func AddressIdIn(values ...interface{}) FilterApplier

AddressIdIn condition

func AddressIdLT

func AddressIdLT(value string) FilterApplier

AddressIdLT less than condition.

func AddressIdLTE

func AddressIdLTE(value string) FilterApplier

AddressIdLTE less than or equal condition.

func AddressIdLike

func AddressIdLike(value string) FilterApplier

AddressIdLike like condition %

func AddressIdNotEq

func AddressIdNotEq(value string) FilterApplier

AddressIdNotEq returns a condition that checks if the field equals the value.

func AddressIdNotIn

func AddressIdNotIn(values ...interface{}) FilterApplier

AddressIdNotIn not in condition

func AddressIdNotLike

func AddressIdNotLike(value string) FilterApplier

AddressIdNotLike not like condition

func AddressIdOrderBy

func AddressIdOrderBy(asc bool) FilterApplier

AddressIdOrderBy sorts the result in ascending order.

func AddressUserIdBetween

func AddressUserIdBetween(min, max string) FilterApplier

AddressUserIdBetween between condition.

func AddressUserIdEq

func AddressUserIdEq(value string) FilterApplier

AddressUserIdEq returns a condition that checks if the field equals the value.

func AddressUserIdGT

func AddressUserIdGT(value string) FilterApplier

AddressUserIdGT greaterThanCondition than condition.

func AddressUserIdGTE

func AddressUserIdGTE(value string) FilterApplier

AddressUserIdGTE greater than or equal condition.

func AddressUserIdILike

func AddressUserIdILike(value string) FilterApplier

AddressUserIdILike iLike condition %

func AddressUserIdIn

func AddressUserIdIn(values ...interface{}) FilterApplier

AddressUserIdIn condition

func AddressUserIdLT

func AddressUserIdLT(value string) FilterApplier

AddressUserIdLT less than condition.

func AddressUserIdLTE

func AddressUserIdLTE(value string) FilterApplier

AddressUserIdLTE less than or equal condition.

func AddressUserIdLike

func AddressUserIdLike(value string) FilterApplier

AddressUserIdLike like condition %

func AddressUserIdNotEq

func AddressUserIdNotEq(value string) FilterApplier

AddressUserIdNotEq returns a condition that checks if the field equals the value.

func AddressUserIdNotIn

func AddressUserIdNotIn(values ...interface{}) FilterApplier

AddressUserIdNotIn not in condition

func AddressUserIdNotLike

func AddressUserIdNotLike(value string) FilterApplier

AddressUserIdNotLike not like condition

func AddressUserIdOrderBy

func AddressUserIdOrderBy(asc bool) FilterApplier

AddressUserIdOrderBy sorts the result in ascending order.

func And

func And(conditions ...FilterApplier) FilterApplier

And returns a condition that combines the given conditions with AND.

func Between

func Between(field string, min, max interface{}) FilterApplier

Between returns a condition that checks if the field is between the min and max values.

func BotCreatedAtBetween

func BotCreatedAtBetween(min, max time.Time) FilterApplier

BotCreatedAtBetween between condition.

func BotCreatedAtEq

func BotCreatedAtEq(value time.Time) FilterApplier

BotCreatedAtEq returns a condition that checks if the field equals the value.

func BotCreatedAtGT

func BotCreatedAtGT(value time.Time) FilterApplier

BotCreatedAtGT greaterThanCondition than condition.

func BotCreatedAtGTE

func BotCreatedAtGTE(value time.Time) FilterApplier

BotCreatedAtGTE greater than or equal condition.

func BotCreatedAtIn

func BotCreatedAtIn(values ...interface{}) FilterApplier

BotCreatedAtIn condition

func BotCreatedAtLT

func BotCreatedAtLT(value time.Time) FilterApplier

BotCreatedAtLT less than condition.

func BotCreatedAtLTE

func BotCreatedAtLTE(value time.Time) FilterApplier

BotCreatedAtLTE less than or equal condition.

func BotCreatedAtNotEq

func BotCreatedAtNotEq(value time.Time) FilterApplier

BotCreatedAtNotEq returns a condition that checks if the field equals the value.

func BotCreatedAtNotIn

func BotCreatedAtNotIn(values ...interface{}) FilterApplier

BotCreatedAtNotIn not in condition

func BotCreatedAtOrderBy

func BotCreatedAtOrderBy(asc bool) FilterApplier

BotCreatedAtOrderBy sorts the result in ascending order.

func BotIdBetween

func BotIdBetween(min, max string) FilterApplier

BotIdBetween between condition.

func BotIdEq

func BotIdEq(value string) FilterApplier

BotIdEq returns a condition that checks if the field equals the value.

func BotIdGT

func BotIdGT(value string) FilterApplier

BotIdGT greaterThanCondition than condition.

func BotIdGTE

func BotIdGTE(value string) FilterApplier

BotIdGTE greater than or equal condition.

func BotIdILike

func BotIdILike(value string) FilterApplier

BotIdILike iLike condition %

func BotIdIn

func BotIdIn(values ...interface{}) FilterApplier

BotIdIn condition

func BotIdLT

func BotIdLT(value string) FilterApplier

BotIdLT less than condition.

func BotIdLTE

func BotIdLTE(value string) FilterApplier

BotIdLTE less than or equal condition.

func BotIdLike

func BotIdLike(value string) FilterApplier

BotIdLike like condition %

func BotIdNotEq

func BotIdNotEq(value string) FilterApplier

BotIdNotEq returns a condition that checks if the field equals the value.

func BotIdNotIn

func BotIdNotIn(values ...interface{}) FilterApplier

BotIdNotIn not in condition

func BotIdNotLike

func BotIdNotLike(value string) FilterApplier

BotIdNotLike not like condition

func BotIdOrderBy

func BotIdOrderBy(asc bool) FilterApplier

BotIdOrderBy sorts the result in ascending order.

func BotUserIdBetween

func BotUserIdBetween(min, max string) FilterApplier

BotUserIdBetween between condition.

func BotUserIdEq

func BotUserIdEq(value string) FilterApplier

BotUserIdEq returns a condition that checks if the field equals the value.

func BotUserIdGT

func BotUserIdGT(value string) FilterApplier

BotUserIdGT greaterThanCondition than condition.

func BotUserIdGTE

func BotUserIdGTE(value string) FilterApplier

BotUserIdGTE greater than or equal condition.

func BotUserIdILike

func BotUserIdILike(value string) FilterApplier

BotUserIdILike iLike condition %

func BotUserIdIn

func BotUserIdIn(values ...interface{}) FilterApplier

BotUserIdIn condition

func BotUserIdLT

func BotUserIdLT(value string) FilterApplier

BotUserIdLT less than condition.

func BotUserIdLTE

func BotUserIdLTE(value string) FilterApplier

BotUserIdLTE less than or equal condition.

func BotUserIdLike

func BotUserIdLike(value string) FilterApplier

BotUserIdLike like condition %

func BotUserIdNotEq

func BotUserIdNotEq(value string) FilterApplier

BotUserIdNotEq returns a condition that checks if the field equals the value.

func BotUserIdNotIn

func BotUserIdNotIn(values ...interface{}) FilterApplier

BotUserIdNotIn not in condition

func BotUserIdNotLike

func BotUserIdNotLike(value string) FilterApplier

BotUserIdNotLike not like condition

func BotUserIdOrderBy

func BotUserIdOrderBy(asc bool) FilterApplier

BotUserIdOrderBy sorts the result in ascending order.

func BotViewCreatedAtBetween

func BotViewCreatedAtBetween(min, max time.Time) FilterApplier

BotViewCreatedAtBetween between condition.

func BotViewCreatedAtEq

func BotViewCreatedAtEq(value time.Time) FilterApplier

BotViewCreatedAtEq returns a condition that checks if the field equals the value.

func BotViewCreatedAtGT

func BotViewCreatedAtGT(value time.Time) FilterApplier

BotViewCreatedAtGT greaterThanCondition than condition.

func BotViewCreatedAtGTE

func BotViewCreatedAtGTE(value time.Time) FilterApplier

BotViewCreatedAtGTE greater than or equal condition.

func BotViewCreatedAtIn

func BotViewCreatedAtIn(values ...interface{}) FilterApplier

BotViewCreatedAtIn condition

func BotViewCreatedAtLT

func BotViewCreatedAtLT(value time.Time) FilterApplier

BotViewCreatedAtLT less than condition.

func BotViewCreatedAtLTE

func BotViewCreatedAtLTE(value time.Time) FilterApplier

BotViewCreatedAtLTE less than or equal condition.

func BotViewCreatedAtNotEq

func BotViewCreatedAtNotEq(value time.Time) FilterApplier

BotViewCreatedAtNotEq returns a condition that checks if the field equals the value.

func BotViewCreatedAtNotIn

func BotViewCreatedAtNotIn(values ...interface{}) FilterApplier

BotViewCreatedAtNotIn not in condition

func BotViewCreatedAtOrderBy

func BotViewCreatedAtOrderBy(asc bool) FilterApplier

BotViewCreatedAtOrderBy sorts the result in ascending order.

func BotViewIdBetween

func BotViewIdBetween(min, max string) FilterApplier

BotViewIdBetween between condition.

func BotViewIdEq

func BotViewIdEq(value string) FilterApplier

BotViewIdEq returns a condition that checks if the field equals the value.

func BotViewIdGT

func BotViewIdGT(value string) FilterApplier

BotViewIdGT greaterThanCondition than condition.

func BotViewIdGTE

func BotViewIdGTE(value string) FilterApplier

BotViewIdGTE greater than or equal condition.

func BotViewIdILike

func BotViewIdILike(value string) FilterApplier

BotViewIdILike iLike condition %

func BotViewIdIn

func BotViewIdIn(values ...interface{}) FilterApplier

BotViewIdIn condition

func BotViewIdLT

func BotViewIdLT(value string) FilterApplier

BotViewIdLT less than condition.

func BotViewIdLTE

func BotViewIdLTE(value string) FilterApplier

BotViewIdLTE less than or equal condition.

func BotViewIdLike

func BotViewIdLike(value string) FilterApplier

BotViewIdLike like condition %

func BotViewIdNotEq

func BotViewIdNotEq(value string) FilterApplier

BotViewIdNotEq returns a condition that checks if the field equals the value.

func BotViewIdNotIn

func BotViewIdNotIn(values ...interface{}) FilterApplier

BotViewIdNotIn not in condition

func BotViewIdNotLike

func BotViewIdNotLike(value string) FilterApplier

BotViewIdNotLike not like condition

func BotViewIdOrderBy

func BotViewIdOrderBy(asc bool) FilterApplier

BotViewIdOrderBy sorts the result in ascending order.

func BotViewUserIdBetween

func BotViewUserIdBetween(min, max string) FilterApplier

BotViewUserIdBetween between condition.

func BotViewUserIdEq

func BotViewUserIdEq(value string) FilterApplier

BotViewUserIdEq returns a condition that checks if the field equals the value.

func BotViewUserIdGT

func BotViewUserIdGT(value string) FilterApplier

BotViewUserIdGT greaterThanCondition than condition.

func BotViewUserIdGTE

func BotViewUserIdGTE(value string) FilterApplier

BotViewUserIdGTE greater than or equal condition.

func BotViewUserIdILike

func BotViewUserIdILike(value string) FilterApplier

BotViewUserIdILike iLike condition %

func BotViewUserIdIn

func BotViewUserIdIn(values ...interface{}) FilterApplier

BotViewUserIdIn condition

func BotViewUserIdLT

func BotViewUserIdLT(value string) FilterApplier

BotViewUserIdLT less than condition.

func BotViewUserIdLTE

func BotViewUserIdLTE(value string) FilterApplier

BotViewUserIdLTE less than or equal condition.

func BotViewUserIdLike

func BotViewUserIdLike(value string) FilterApplier

BotViewUserIdLike like condition %

func BotViewUserIdNotEq

func BotViewUserIdNotEq(value string) FilterApplier

BotViewUserIdNotEq returns a condition that checks if the field equals the value.

func BotViewUserIdNotIn

func BotViewUserIdNotIn(values ...interface{}) FilterApplier

BotViewUserIdNotIn not in condition

func BotViewUserIdNotLike

func BotViewUserIdNotLike(value string) FilterApplier

BotViewUserIdNotLike not like condition

func BotViewUserIdOrderBy

func BotViewUserIdOrderBy(asc bool) FilterApplier

BotViewUserIdOrderBy sorts the result in ascending order.

func CommentIdBetween added in v1.1.27

func CommentIdBetween(min, max string) FilterApplier

CommentIdBetween between condition.

func CommentIdEq added in v1.1.27

func CommentIdEq(value string) FilterApplier

CommentIdEq returns a condition that checks if the field equals the value.

func CommentIdGT added in v1.1.27

func CommentIdGT(value string) FilterApplier

CommentIdGT greaterThanCondition than condition.

func CommentIdGTE added in v1.1.27

func CommentIdGTE(value string) FilterApplier

CommentIdGTE greater than or equal condition.

func CommentIdILike added in v1.1.27

func CommentIdILike(value string) FilterApplier

CommentIdILike iLike condition %

func CommentIdIn added in v1.1.27

func CommentIdIn(values ...interface{}) FilterApplier

CommentIdIn condition

func CommentIdLT added in v1.1.27

func CommentIdLT(value string) FilterApplier

CommentIdLT less than condition.

func CommentIdLTE added in v1.1.27

func CommentIdLTE(value string) FilterApplier

CommentIdLTE less than or equal condition.

func CommentIdLike added in v1.1.27

func CommentIdLike(value string) FilterApplier

CommentIdLike like condition %

func CommentIdNotEq added in v1.1.27

func CommentIdNotEq(value string) FilterApplier

CommentIdNotEq returns a condition that checks if the field equals the value.

func CommentIdNotIn added in v1.1.27

func CommentIdNotIn(values ...interface{}) FilterApplier

CommentIdNotIn not in condition

func CommentIdNotLike added in v1.1.27

func CommentIdNotLike(value string) FilterApplier

CommentIdNotLike not like condition

func CommentIdOrderBy added in v1.1.27

func CommentIdOrderBy(asc bool) FilterApplier

CommentIdOrderBy sorts the result in ascending order.

func CommentPostIdBetween added in v1.1.27

func CommentPostIdBetween(min, max int32) FilterApplier

CommentPostIdBetween between condition.

func CommentPostIdEq added in v1.1.27

func CommentPostIdEq(value int32) FilterApplier

CommentPostIdEq returns a condition that checks if the field equals the value.

func CommentPostIdGT added in v1.1.27

func CommentPostIdGT(value int32) FilterApplier

CommentPostIdGT greaterThanCondition than condition.

func CommentPostIdGTE added in v1.1.27

func CommentPostIdGTE(value int32) FilterApplier

CommentPostIdGTE greater than or equal condition.

func CommentPostIdIn added in v1.1.27

func CommentPostIdIn(values ...interface{}) FilterApplier

CommentPostIdIn condition

func CommentPostIdLT added in v1.1.27

func CommentPostIdLT(value int32) FilterApplier

CommentPostIdLT less than condition.

func CommentPostIdLTE added in v1.1.27

func CommentPostIdLTE(value int32) FilterApplier

CommentPostIdLTE less than or equal condition.

func CommentPostIdNotEq added in v1.1.27

func CommentPostIdNotEq(value int32) FilterApplier

CommentPostIdNotEq returns a condition that checks if the field equals the value.

func CommentPostIdNotIn added in v1.1.27

func CommentPostIdNotIn(values ...interface{}) FilterApplier

CommentPostIdNotIn not in condition

func CommentPostIdOrderBy added in v1.1.27

func CommentPostIdOrderBy(asc bool) FilterApplier

CommentPostIdOrderBy sorts the result in ascending order.

func CommentUserIdBetween added in v1.1.27

func CommentUserIdBetween(min, max string) FilterApplier

CommentUserIdBetween between condition.

func CommentUserIdEq added in v1.1.27

func CommentUserIdEq(value string) FilterApplier

CommentUserIdEq returns a condition that checks if the field equals the value.

func CommentUserIdGT added in v1.1.27

func CommentUserIdGT(value string) FilterApplier

CommentUserIdGT greaterThanCondition than condition.

func CommentUserIdGTE added in v1.1.27

func CommentUserIdGTE(value string) FilterApplier

CommentUserIdGTE greater than or equal condition.

func CommentUserIdILike added in v1.1.27

func CommentUserIdILike(value string) FilterApplier

CommentUserIdILike iLike condition %

func CommentUserIdIn added in v1.1.27

func CommentUserIdIn(values ...interface{}) FilterApplier

CommentUserIdIn condition

func CommentUserIdLT added in v1.1.27

func CommentUserIdLT(value string) FilterApplier

CommentUserIdLT less than condition.

func CommentUserIdLTE added in v1.1.27

func CommentUserIdLTE(value string) FilterApplier

CommentUserIdLTE less than or equal condition.

func CommentUserIdLike added in v1.1.27

func CommentUserIdLike(value string) FilterApplier

CommentUserIdLike like condition %

func CommentUserIdNotEq added in v1.1.27

func CommentUserIdNotEq(value string) FilterApplier

CommentUserIdNotEq returns a condition that checks if the field equals the value.

func CommentUserIdNotIn added in v1.1.27

func CommentUserIdNotIn(values ...interface{}) FilterApplier

CommentUserIdNotIn not in condition

func CommentUserIdNotLike added in v1.1.27

func CommentUserIdNotLike(value string) FilterApplier

CommentUserIdNotLike not like condition

func CommentUserIdOrderBy added in v1.1.27

func CommentUserIdOrderBy(asc bool) FilterApplier

CommentUserIdOrderBy sorts the result in ascending order.

func DeviceUserIdBetween

func DeviceUserIdBetween(min, max string) FilterApplier

DeviceUserIdBetween between condition.

func DeviceUserIdEq

func DeviceUserIdEq(value string) FilterApplier

DeviceUserIdEq returns a condition that checks if the field equals the value.

func DeviceUserIdGT

func DeviceUserIdGT(value string) FilterApplier

DeviceUserIdGT greaterThanCondition than condition.

func DeviceUserIdGTE

func DeviceUserIdGTE(value string) FilterApplier

DeviceUserIdGTE greater than or equal condition.

func DeviceUserIdILike

func DeviceUserIdILike(value string) FilterApplier

DeviceUserIdILike iLike condition %

func DeviceUserIdIn

func DeviceUserIdIn(values ...interface{}) FilterApplier

DeviceUserIdIn condition

func DeviceUserIdLT

func DeviceUserIdLT(value string) FilterApplier

DeviceUserIdLT less than condition.

func DeviceUserIdLTE

func DeviceUserIdLTE(value string) FilterApplier

DeviceUserIdLTE less than or equal condition.

func DeviceUserIdLike

func DeviceUserIdLike(value string) FilterApplier

DeviceUserIdLike like condition %

func DeviceUserIdNotEq

func DeviceUserIdNotEq(value string) FilterApplier

DeviceUserIdNotEq returns a condition that checks if the field equals the value.

func DeviceUserIdNotIn

func DeviceUserIdNotIn(values ...interface{}) FilterApplier

DeviceUserIdNotIn not in condition

func DeviceUserIdNotLike

func DeviceUserIdNotLike(value string) FilterApplier

DeviceUserIdNotLike not like condition

func DeviceUserIdOrderBy

func DeviceUserIdOrderBy(asc bool) FilterApplier

DeviceUserIdOrderBy sorts the result in ascending order.

func Eq

func Eq(field string, value interface{}) FilterApplier

Eq returns a condition that checks if the field equals the value.

func GreaterThan

func GreaterThan(field string, value interface{}) FilterApplier

GreaterThan returns a condition that checks if the field equals the value.

func GreaterThanOrEq

func GreaterThanOrEq(field string, value interface{}) FilterApplier

GreaterThanOrEqual returns a condition that checks if the field equals the value.

func ILike

func ILike(field string, value interface{}) FilterApplier

ILike returns a condition that checks if the field equals the value.

func In

func In(field string, values ...interface{}) FilterApplier

In returns a condition that checks if the field is in the given values.

func IsNotNull

func IsNotNull(field string) FilterApplier

IsNotNull returns a condition that checks if the field is not null.

func IsNull

func IsNull(field string) FilterApplier

IsNull returns a condition that checks if the field is null.

func Join

func Join(joinType JoinType, table Table, on FilterApplier) FilterApplier

func LessThan

func LessThan(field string, value interface{}) FilterApplier

LessThan returns a condition that checks if the field equals the value.

func LessThanOrEq

func LessThanOrEq(field string, value interface{}) FilterApplier

func Like

func Like(field string, value interface{}) FilterApplier

Like returns a condition that checks if the field equals the value.

func MessageBotIdBetween

func MessageBotIdBetween(min, max string) FilterApplier

MessageBotIdBetween between condition.

func MessageBotIdEq

func MessageBotIdEq(value string) FilterApplier

MessageBotIdEq returns a condition that checks if the field equals the value.

func MessageBotIdGT

func MessageBotIdGT(value string) FilterApplier

MessageBotIdGT greaterThanCondition than condition.

func MessageBotIdGTE

func MessageBotIdGTE(value string) FilterApplier

MessageBotIdGTE greater than or equal condition.

func MessageBotIdILike

func MessageBotIdILike(value string) FilterApplier

MessageBotIdILike iLike condition %

func MessageBotIdIn

func MessageBotIdIn(values ...interface{}) FilterApplier

MessageBotIdIn condition

func MessageBotIdIsNotNull

func MessageBotIdIsNotNull() FilterApplier

MessageBotIdIsNotNull checks if the bot_id is NOT NULL.

func MessageBotIdIsNull

func MessageBotIdIsNull() FilterApplier

MessageBotIdIsNull checks if the bot_id is NULL.

func MessageBotIdLT

func MessageBotIdLT(value string) FilterApplier

MessageBotIdLT less than condition.

func MessageBotIdLTE

func MessageBotIdLTE(value string) FilterApplier

MessageBotIdLTE less than or equal condition.

func MessageBotIdLike

func MessageBotIdLike(value string) FilterApplier

MessageBotIdLike like condition %

func MessageBotIdNotEq

func MessageBotIdNotEq(value string) FilterApplier

MessageBotIdNotEq returns a condition that checks if the field equals the value.

func MessageBotIdNotIn

func MessageBotIdNotIn(values ...interface{}) FilterApplier

MessageBotIdNotIn not in condition

func MessageBotIdNotLike

func MessageBotIdNotLike(value string) FilterApplier

MessageBotIdNotLike not like condition

func MessageBotIdOrderBy

func MessageBotIdOrderBy(asc bool) FilterApplier

MessageBotIdOrderBy sorts the result in ascending order.

func MessageIdBetween

func MessageIdBetween(min, max string) FilterApplier

MessageIdBetween between condition.

func MessageIdEq

func MessageIdEq(value string) FilterApplier

MessageIdEq returns a condition that checks if the field equals the value.

func MessageIdGT

func MessageIdGT(value string) FilterApplier

MessageIdGT greaterThanCondition than condition.

func MessageIdGTE

func MessageIdGTE(value string) FilterApplier

MessageIdGTE greater than or equal condition.

func MessageIdILike

func MessageIdILike(value string) FilterApplier

MessageIdILike iLike condition %

func MessageIdIn

func MessageIdIn(values ...interface{}) FilterApplier

MessageIdIn condition

func MessageIdLT

func MessageIdLT(value string) FilterApplier

MessageIdLT less than condition.

func MessageIdLTE

func MessageIdLTE(value string) FilterApplier

MessageIdLTE less than or equal condition.

func MessageIdLike

func MessageIdLike(value string) FilterApplier

MessageIdLike like condition %

func MessageIdNotEq

func MessageIdNotEq(value string) FilterApplier

MessageIdNotEq returns a condition that checks if the field equals the value.

func MessageIdNotIn

func MessageIdNotIn(values ...interface{}) FilterApplier

MessageIdNotIn not in condition

func MessageIdNotLike

func MessageIdNotLike(value string) FilterApplier

MessageIdNotLike not like condition

func MessageIdOrderBy

func MessageIdOrderBy(asc bool) FilterApplier

MessageIdOrderBy sorts the result in ascending order.

func MessageToUserIdBetween

func MessageToUserIdBetween(min, max string) FilterApplier

MessageToUserIdBetween between condition.

func MessageToUserIdEq

func MessageToUserIdEq(value string) FilterApplier

MessageToUserIdEq returns a condition that checks if the field equals the value.

func MessageToUserIdGT

func MessageToUserIdGT(value string) FilterApplier

MessageToUserIdGT greaterThanCondition than condition.

func MessageToUserIdGTE

func MessageToUserIdGTE(value string) FilterApplier

MessageToUserIdGTE greater than or equal condition.

func MessageToUserIdILike

func MessageToUserIdILike(value string) FilterApplier

MessageToUserIdILike iLike condition %

func MessageToUserIdIn

func MessageToUserIdIn(values ...interface{}) FilterApplier

MessageToUserIdIn condition

func MessageToUserIdLT

func MessageToUserIdLT(value string) FilterApplier

MessageToUserIdLT less than condition.

func MessageToUserIdLTE

func MessageToUserIdLTE(value string) FilterApplier

MessageToUserIdLTE less than or equal condition.

func MessageToUserIdLike

func MessageToUserIdLike(value string) FilterApplier

MessageToUserIdLike like condition %

func MessageToUserIdNotEq

func MessageToUserIdNotEq(value string) FilterApplier

MessageToUserIdNotEq returns a condition that checks if the field equals the value.

func MessageToUserIdNotIn

func MessageToUserIdNotIn(values ...interface{}) FilterApplier

MessageToUserIdNotIn not in condition

func MessageToUserIdNotLike

func MessageToUserIdNotLike(value string) FilterApplier

MessageToUserIdNotLike not like condition

func MessageToUserIdOrderBy

func MessageToUserIdOrderBy(asc bool) FilterApplier

MessageToUserIdOrderBy sorts the result in ascending order.

func NotEq

func NotEq(field string, value interface{}) FilterApplier

NotEq returns a condition that checks if the field equals the value.

func NotIn

func NotIn(field string, values ...interface{}) FilterApplier

NotIn returns a condition that checks if the field is not in the given values.

func NotLike

func NotLike(field string, value interface{}) FilterApplier

NotLike returns a condition that checks if the field equals the value.

func Or

func Or(conditions ...FilterApplier) FilterApplier

Or returns a condition that checks if any of the conditions are true.

func OrderBy

func OrderBy(column string, asc bool) FilterApplier

Apply applies the condition to the query.

func PostAuthorIdBetween

func PostAuthorIdBetween(min, max string) FilterApplier

PostAuthorIdBetween between condition.

func PostAuthorIdEq

func PostAuthorIdEq(value string) FilterApplier

PostAuthorIdEq returns a condition that checks if the field equals the value.

func PostAuthorIdGT

func PostAuthorIdGT(value string) FilterApplier

PostAuthorIdGT greaterThanCondition than condition.

func PostAuthorIdGTE

func PostAuthorIdGTE(value string) FilterApplier

PostAuthorIdGTE greater than or equal condition.

func PostAuthorIdILike

func PostAuthorIdILike(value string) FilterApplier

PostAuthorIdILike iLike condition %

func PostAuthorIdIn

func PostAuthorIdIn(values ...interface{}) FilterApplier

PostAuthorIdIn condition

func PostAuthorIdLT

func PostAuthorIdLT(value string) FilterApplier

PostAuthorIdLT less than condition.

func PostAuthorIdLTE

func PostAuthorIdLTE(value string) FilterApplier

PostAuthorIdLTE less than or equal condition.

func PostAuthorIdLike

func PostAuthorIdLike(value string) FilterApplier

PostAuthorIdLike like condition %

func PostAuthorIdNotEq

func PostAuthorIdNotEq(value string) FilterApplier

PostAuthorIdNotEq returns a condition that checks if the field equals the value.

func PostAuthorIdNotIn

func PostAuthorIdNotIn(values ...interface{}) FilterApplier

PostAuthorIdNotIn not in condition

func PostAuthorIdNotLike

func PostAuthorIdNotLike(value string) FilterApplier

PostAuthorIdNotLike not like condition

func PostAuthorIdOrderBy

func PostAuthorIdOrderBy(asc bool) FilterApplier

PostAuthorIdOrderBy sorts the result in ascending order.

func PostIdBetween

func PostIdBetween(min, max int32) FilterApplier

PostIdBetween between condition.

func PostIdEq

func PostIdEq(value int32) FilterApplier

PostIdEq returns a condition that checks if the field equals the value.

func PostIdGT

func PostIdGT(value int32) FilterApplier

PostIdGT greaterThanCondition than condition.

func PostIdGTE

func PostIdGTE(value int32) FilterApplier

PostIdGTE greater than or equal condition.

func PostIdIn

func PostIdIn(values ...interface{}) FilterApplier

PostIdIn condition

func PostIdLT

func PostIdLT(value int32) FilterApplier

PostIdLT less than condition.

func PostIdLTE

func PostIdLTE(value int32) FilterApplier

PostIdLTE less than or equal condition.

func PostIdNotEq

func PostIdNotEq(value int32) FilterApplier

PostIdNotEq returns a condition that checks if the field equals the value.

func PostIdNotIn

func PostIdNotIn(values ...interface{}) FilterApplier

PostIdNotIn not in condition

func PostIdOrderBy

func PostIdOrderBy(asc bool) FilterApplier

PostIdOrderBy sorts the result in ascending order.

func SettingIdBetween

func SettingIdBetween(min, max int32) FilterApplier

SettingIdBetween between condition.

func SettingIdEq

func SettingIdEq(value int32) FilterApplier

SettingIdEq returns a condition that checks if the field equals the value.

func SettingIdGT

func SettingIdGT(value int32) FilterApplier

SettingIdGT greaterThanCondition than condition.

func SettingIdGTE

func SettingIdGTE(value int32) FilterApplier

SettingIdGTE greater than or equal condition.

func SettingIdIn

func SettingIdIn(values ...interface{}) FilterApplier

SettingIdIn condition

func SettingIdLT

func SettingIdLT(value int32) FilterApplier

SettingIdLT less than condition.

func SettingIdLTE

func SettingIdLTE(value int32) FilterApplier

SettingIdLTE less than or equal condition.

func SettingIdNotEq

func SettingIdNotEq(value int32) FilterApplier

SettingIdNotEq returns a condition that checks if the field equals the value.

func SettingIdNotIn

func SettingIdNotIn(values ...interface{}) FilterApplier

SettingIdNotIn not in condition

func SettingIdOrderBy

func SettingIdOrderBy(asc bool) FilterApplier

SettingIdOrderBy sorts the result in ascending order.

func SettingUserIdBetween

func SettingUserIdBetween(min, max string) FilterApplier

SettingUserIdBetween between condition.

func SettingUserIdEq

func SettingUserIdEq(value string) FilterApplier

SettingUserIdEq returns a condition that checks if the field equals the value.

func SettingUserIdGT

func SettingUserIdGT(value string) FilterApplier

SettingUserIdGT greaterThanCondition than condition.

func SettingUserIdGTE

func SettingUserIdGTE(value string) FilterApplier

SettingUserIdGTE greater than or equal condition.

func SettingUserIdILike

func SettingUserIdILike(value string) FilterApplier

SettingUserIdILike iLike condition %

func SettingUserIdIn

func SettingUserIdIn(values ...interface{}) FilterApplier

SettingUserIdIn condition

func SettingUserIdLT

func SettingUserIdLT(value string) FilterApplier

SettingUserIdLT less than condition.

func SettingUserIdLTE

func SettingUserIdLTE(value string) FilterApplier

SettingUserIdLTE less than or equal condition.

func SettingUserIdLike

func SettingUserIdLike(value string) FilterApplier

SettingUserIdLike like condition %

func SettingUserIdNotEq

func SettingUserIdNotEq(value string) FilterApplier

SettingUserIdNotEq returns a condition that checks if the field equals the value.

func SettingUserIdNotIn

func SettingUserIdNotIn(values ...interface{}) FilterApplier

SettingUserIdNotIn not in condition

func SettingUserIdNotLike

func SettingUserIdNotLike(value string) FilterApplier

SettingUserIdNotLike not like condition

func SettingUserIdOrderBy

func SettingUserIdOrderBy(asc bool) FilterApplier

SettingUserIdOrderBy sorts the result in ascending order.

func UserAgeBetween

func UserAgeBetween(min, max int32) FilterApplier

UserAgeBetween between condition.

func UserAgeEq

func UserAgeEq(value int32) FilterApplier

UserAgeEq returns a condition that checks if the field equals the value.

func UserAgeGT

func UserAgeGT(value int32) FilterApplier

UserAgeGT greaterThanCondition than condition.

func UserAgeGTE

func UserAgeGTE(value int32) FilterApplier

UserAgeGTE greater than or equal condition.

func UserAgeIn

func UserAgeIn(values ...interface{}) FilterApplier

UserAgeIn condition

func UserAgeLT

func UserAgeLT(value int32) FilterApplier

UserAgeLT less than condition.

func UserAgeLTE

func UserAgeLTE(value int32) FilterApplier

UserAgeLTE less than or equal condition.

func UserAgeNotEq

func UserAgeNotEq(value int32) FilterApplier

UserAgeNotEq returns a condition that checks if the field equals the value.

func UserAgeNotIn

func UserAgeNotIn(values ...interface{}) FilterApplier

UserAgeNotIn not in condition

func UserAgeOrderBy

func UserAgeOrderBy(asc bool) FilterApplier

UserAgeOrderBy sorts the result in ascending order.

func UserEmailBetween

func UserEmailBetween(min, max string) FilterApplier

UserEmailBetween between condition.

func UserEmailEq

func UserEmailEq(value string) FilterApplier

UserEmailEq returns a condition that checks if the field equals the value.

func UserEmailGT

func UserEmailGT(value string) FilterApplier

UserEmailGT greaterThanCondition than condition.

func UserEmailGTE

func UserEmailGTE(value string) FilterApplier

UserEmailGTE greater than or equal condition.

func UserEmailILike

func UserEmailILike(value string) FilterApplier

UserEmailILike iLike condition %

func UserEmailIn

func UserEmailIn(values ...interface{}) FilterApplier

UserEmailIn condition

func UserEmailLT

func UserEmailLT(value string) FilterApplier

UserEmailLT less than condition.

func UserEmailLTE

func UserEmailLTE(value string) FilterApplier

UserEmailLTE less than or equal condition.

func UserEmailLike

func UserEmailLike(value string) FilterApplier

UserEmailLike like condition %

func UserEmailNotEq

func UserEmailNotEq(value string) FilterApplier

UserEmailNotEq returns a condition that checks if the field equals the value.

func UserEmailNotIn

func UserEmailNotIn(values ...interface{}) FilterApplier

UserEmailNotIn not in condition

func UserEmailNotLike

func UserEmailNotLike(value string) FilterApplier

UserEmailNotLike not like condition

func UserEmailOrderBy

func UserEmailOrderBy(asc bool) FilterApplier

UserEmailOrderBy sorts the result in ascending order.

func UserIdBetween

func UserIdBetween(min, max string) FilterApplier

UserIdBetween between condition.

func UserIdEq

func UserIdEq(value string) FilterApplier

UserIdEq returns a condition that checks if the field equals the value.

func UserIdGT

func UserIdGT(value string) FilterApplier

UserIdGT greaterThanCondition than condition.

func UserIdGTE

func UserIdGTE(value string) FilterApplier

UserIdGTE greater than or equal condition.

func UserIdILike

func UserIdILike(value string) FilterApplier

UserIdILike iLike condition %

func UserIdIn

func UserIdIn(values ...interface{}) FilterApplier

UserIdIn condition

func UserIdLT

func UserIdLT(value string) FilterApplier

UserIdLT less than condition.

func UserIdLTE

func UserIdLTE(value string) FilterApplier

UserIdLTE less than or equal condition.

func UserIdLike

func UserIdLike(value string) FilterApplier

UserIdLike like condition %

func UserIdNotEq

func UserIdNotEq(value string) FilterApplier

UserIdNotEq returns a condition that checks if the field equals the value.

func UserIdNotIn

func UserIdNotIn(values ...interface{}) FilterApplier

UserIdNotIn not in condition

func UserIdNotLike

func UserIdNotLike(value string) FilterApplier

UserIdNotLike not like condition

func UserIdOrderBy

func UserIdOrderBy(asc bool) FilterApplier

UserIdOrderBy sorts the result in ascending order.

func UserNameBetween

func UserNameBetween(min, max string) FilterApplier

UserNameBetween between condition.

func UserNameEq

func UserNameEq(value string) FilterApplier

UserNameEq returns a condition that checks if the field equals the value.

func UserNameGT

func UserNameGT(value string) FilterApplier

UserNameGT greaterThanCondition than condition.

func UserNameGTE

func UserNameGTE(value string) FilterApplier

UserNameGTE greater than or equal condition.

func UserNameILike

func UserNameILike(value string) FilterApplier

UserNameILike iLike condition %

func UserNameIn

func UserNameIn(values ...interface{}) FilterApplier

UserNameIn condition

func UserNameLT

func UserNameLT(value string) FilterApplier

UserNameLT less than condition.

func UserNameLTE

func UserNameLTE(value string) FilterApplier

UserNameLTE less than or equal condition.

func UserNameLike

func UserNameLike(value string) FilterApplier

UserNameLike like condition %

func UserNameNotEq

func UserNameNotEq(value string) FilterApplier

UserNameNotEq returns a condition that checks if the field equals the value.

func UserNameNotIn

func UserNameNotIn(values ...interface{}) FilterApplier

UserNameNotIn not in condition

func UserNameNotLike

func UserNameNotLike(value string) FilterApplier

UserNameNotLike not like condition

func UserNameOrderBy

func UserNameOrderBy(asc bool) FilterApplier

UserNameOrderBy sorts the result in ascending order.

type GreaterThanCondition

type GreaterThanCondition struct {
	Field string
	Value interface{}
}

GreaterThanCondition greaterThanCondition than condition.

func (GreaterThanCondition) Apply

Apply applies the condition to the query.

func (GreaterThanCondition) ApplyDelete

func (c GreaterThanCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type GreaterThanOrEqualCondition

type GreaterThanOrEqualCondition struct {
	Field string
	Value interface{}
}

LessThanOrEqualCondition less than or equal condition.

func (GreaterThanOrEqualCondition) Apply

Apply applies the condition to the query.

func (GreaterThanOrEqualCondition) ApplyDelete

ApplyDelete applies the condition to the query.

type ILikeCondition

type ILikeCondition struct {
	Field string
	Value interface{}
}

ILikeCondition ilike condition.

func (ILikeCondition) Apply

Apply applies the condition to the query.

func (ILikeCondition) ApplyDelete

func (c ILikeCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type InCondition

type InCondition struct {
	Field  string
	Values []interface{}
}

InCondition represents the IN condition.

func (InCondition) Apply

func (c InCondition) Apply(query sq.SelectBuilder) sq.SelectBuilder

Apply applies the condition to the query.

func (InCondition) ApplyDelete

func (c InCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type IsNotNullCondition

type IsNotNullCondition struct {
	Field string
}

IsNotNullCondition represents the IS NOT NULL condition.

func (IsNotNullCondition) Apply

Apply applies the condition to the query.

func (IsNotNullCondition) ApplyDelete

func (c IsNotNullCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type IsNullCondition

type IsNullCondition struct {
	Field string
}

IsNullCondition represents the IS NULL condition.

func (IsNullCondition) Apply

Apply applies the condition to the query.

func (IsNullCondition) ApplyDelete

func (c IsNullCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type JoinCondition

type JoinCondition struct {
	Type  JoinType
	Table Table
	On    FilterApplier
}

func (JoinCondition) Apply

func (JoinCondition) ApplyDelete

func (c JoinCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

type JoinType

type JoinType string
const (
	LeftJoin  JoinType = "LEFT"
	InnerJoin JoinType = "INNER"
	RightJoin JoinType = "RIGHT"
)

type LessThanCondition

type LessThanCondition struct {
	Field string
	Value interface{}
}

LessThanCondition less than condition.

func (LessThanCondition) Apply

Apply applies the condition to the query.

func (LessThanCondition) ApplyDelete

func (c LessThanCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type LessThanOrEqualCondition

type LessThanOrEqualCondition struct {
	Field string
	Value interface{}
}

LessThanOrEqualCondition less than or equal condition.

func (LessThanOrEqualCondition) Apply

Apply applies the condition to the query.

func (LessThanOrEqualCondition) ApplyDelete

ApplyDelete applies the condition to the query.

type LikeCondition

type LikeCondition struct {
	Field string
	Value interface{}
}

LikeCondition like condition.

func (LikeCondition) Apply

Apply applies the condition to the query.

func (LikeCondition) ApplyDelete

func (c LikeCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type Message

type Message struct {
	Id         string
	FromUserId string
	ToUserId   string
	BotId      *string
	Bot        *Bot
	FromUser   *User
	ToUser     *User
}

Message is a struct for the "messages" table.

func (*Message) ScanRow

func (t *Message) ScanRow(row driver.Row) error

ScanRow scans a row into a Message.

func (*Message) TableName

func (t *Message) TableName() string

TableName returns the table name.

type MessageCRUDOperations

type MessageCRUDOperations interface {
	Create(ctx context.Context, model *Message, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Message, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Message, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Message, opts ...Option) error
}

MessageCRUDOperations is an interface for managing the messages table.

type MessageFilters

type MessageFilters struct {
	Id       *string
	ToUserId *string
	BotId    *string
}

MessageFilters is a struct that holds filters for Message.

type MessageRawQueryOperations

type MessageRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

MessageRawQueryOperations is an interface for executing raw queries.

type MessageRelationLoading

type MessageRelationLoading interface {
	LoadBot(ctx context.Context, model *Message, builders ...*QueryBuilder) error
	LoadFromUser(ctx context.Context, model *Message, builders ...*QueryBuilder) error
	LoadToUser(ctx context.Context, model *Message, builders ...*QueryBuilder) error
	LoadBatchBot(ctx context.Context, items []*Message, builders ...*QueryBuilder) error
	LoadBatchFromUser(ctx context.Context, items []*Message, builders ...*QueryBuilder) error
	LoadBatchToUser(ctx context.Context, items []*Message, builders ...*QueryBuilder) error
}

MessageRelationLoading is an interface for loading relations.

type MessageSearchOperations

type MessageSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Message, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Message, error)
}

MessageSearchOperations is an interface for searching the messages table.

type MessageSettings

type MessageSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) MessageStorage
	SetQueryBuilder(builder sq.StatementBuilderType) MessageStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type MessageStorage

MessageStorage is a struct for the "messages" table.

func NewMessageStorage

func NewMessageStorage(config *Config) (MessageStorage, error)

NewMessageStorage returns a new messageStorage.

type NotEqualsCondition

type NotEqualsCondition struct {
	Field string
	Value interface{}
}

NotEqualsCondition not equals condition.

func (NotEqualsCondition) Apply

Apply applies the condition to the query.

func (NotEqualsCondition) ApplyDelete

func (c NotEqualsCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type NotInCondition

type NotInCondition struct {
	Field  string
	Values []interface{}
}

NotInCondition represents the NOT IN condition.

func (NotInCondition) Apply

Apply applies the condition to the query.

func (NotInCondition) ApplyDelete

func (c NotInCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type NotLikeCondition

type NotLikeCondition struct {
	Field string
	Value interface{}
}

NotLikeCondition not like condition.

func (NotLikeCondition) Apply

Apply applies the condition to the query.

func (NotLikeCondition) ApplyDelete

func (c NotLikeCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type NullableJSON

type NullableJSON[T any] struct {
	Data  T
	Valid bool // Valid is true if the field is not NULL
}

NullableJSON represents a JSON field that can be null.

func NewNullableJSON

func NewNullableJSON[T any](v T) NullableJSON[T]

NewNullableJSON creates a new NullableJSON with a value.

func (*NullableJSON[T]) Scan

func (n *NullableJSON[T]) Scan(value interface{}) error

Scan implements the sql.Scanner interface.

func (*NullableJSON[T]) Value

func (n *NullableJSON[T]) Value() (string, error)

Value converts NullableJSON to a string representation for ClickHouse.

func (NullableJSON[T]) ValueOrZero

func (n NullableJSON[T]) ValueOrZero() T

ValueOrZero returns the value if valid, otherwise returns the zero value of type T.

type Option

type Option func(*Options)

Option is a function that configures the BlogStorages.

func WithRelations

func WithRelations() Option

WithRelations sets the relations flag. This is used to determine if the relations should be created or updated.

func WithUniqField

func WithUniqField(field string) Option

WithUniqField sets the unique field.

func WithWaitAsyncInsert added in v1.1.24

func WithWaitAsyncInsert() Option

WithWaitAsyncInsert sets the waitAsyncInsert flag.

type Options

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

Options are the options for the BlogStorages.

type OrCondition

type OrCondition struct {
	Conditions []FilterApplier
}

Or returns a condition that checks if any of the conditions are true.

func (OrCondition) Apply

func (c OrCondition) Apply(query sq.SelectBuilder) sq.SelectBuilder

Apply applies the condition to the query.

func (OrCondition) ApplyDelete

func (c OrCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

Apply applies the condition to the query.

type OrderCondition

type OrderCondition struct {
	Column string
	Asc    bool
}

OrderCondition represents the ORDER BY condition.

func (OrderCondition) Apply

Apply applies the condition to the query.

func (OrderCondition) ApplyDelete

func (c OrderCondition) ApplyDelete(query sq.DeleteBuilder) sq.DeleteBuilder

ApplyDelete applies the condition to the query.

type Pagination

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

Pagination is the pagination.

func Limit

func Limit(limit uint64) *Pagination

Limit is a helper function to create a new pagination.

func NewPagination

func NewPagination(limit, offset uint64) *Pagination

NewPagination returns a new pagination. If limit or offset are nil, then they will be omitted.

func Offset

func Offset(offset uint64) *Pagination

Offset is a helper function to create a new pagination.

type Post

type Post struct {
	Id       int32
	Title    string
	Body     string
	Author   *User
	AuthorId string
}

Post is a struct for the "posts" table.

func (*Post) ScanRow

func (t *Post) ScanRow(row driver.Row) error

ScanRow scans a row into a Post.

func (*Post) TableName

func (t *Post) TableName() string

TableName returns the table name.

type PostCRUDOperations

type PostCRUDOperations interface {
	Create(ctx context.Context, model *Post, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Post, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Post, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Post, opts ...Option) error
}

PostCRUDOperations is an interface for managing the posts table.

type PostFilters

type PostFilters struct {
	Id       *int32
	AuthorId *string
}

PostFilters is a struct that holds filters for Post.

type PostRawQueryOperations

type PostRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

PostRawQueryOperations is an interface for executing raw queries.

type PostRelationLoading

type PostRelationLoading interface {
	LoadAuthor(ctx context.Context, model *Post, builders ...*QueryBuilder) error
	LoadBatchAuthor(ctx context.Context, items []*Post, builders ...*QueryBuilder) error
}

PostRelationLoading is an interface for loading relations.

type PostSearchOperations

type PostSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Post, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Post, error)
}

PostSearchOperations is an interface for searching the posts table.

type PostSettings

type PostSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) PostStorage
	SetQueryBuilder(builder sq.StatementBuilderType) PostStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type PostStorage

PostStorage is a struct for the "posts" table.

func NewPostStorage

func NewPostStorage(config *Config) (PostStorage, error)

NewPostStorage returns a new postStorage.

type QueryBuilder

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

QueryBuilder is a query builder.

func FilterBuilder

func FilterBuilder(filterOptions ...FilterApplier) *QueryBuilder

Filter is a helper function to create a new query builder with filter options.

func LimitBuilder

func LimitBuilder(limit uint64) *QueryBuilder

Options is a helper function to create a new query builder with options.

func NewQueryBuilder

func NewQueryBuilder() *QueryBuilder

NewQueryBuilder returns a new query builder.

func OffsetBuilder

func OffsetBuilder(offset uint64) *QueryBuilder

Offset is a helper function to create a new query builder with options.

func PaginateBuilder

func PaginateBuilder(limit, offset uint64) *QueryBuilder

Paginate is a helper function to create a new query builder with options.

func PrewhereBuilder added in v1.1.41

func PrewhereBuilder(prewhereOptions ...FilterApplier) *QueryBuilder

PrewhereBuilder is a helper function to create a new query builder with PREWHERE options (ClickHouse specific). PREWHERE filters are applied before reading all columns, improving performance for queries with selective filters.

func SettingBuilder added in v1.1.41

func SettingBuilder(key string, value interface{}) *QueryBuilder

SettingBuilder is a helper function to create a new query builder with a single setting.

func SettingsBuilder added in v1.1.41

func SettingsBuilder(settings map[string]interface{}) *QueryBuilder

SettingsBuilder is a helper function to create a new query builder with settings.

func SortBuilder

func SortBuilder(sortOptions ...FilterApplier) *QueryBuilder

SortBuilder is a helper function to create a new query builder with sort options.

func (*QueryBuilder) ApplyCustomFilters

func (qb *QueryBuilder) ApplyCustomFilters(query sq.SelectBuilder) sq.SelectBuilder

ApplyCustomFilters applies the custom filters to the query.

func (*QueryBuilder) ApplyCustomTableName added in v1.1.19

func (qb *QueryBuilder) ApplyCustomTableName(query sq.SelectBuilder) sq.SelectBuilder

Apply customTableName to the query.

func (*QueryBuilder) WithCustomFilter

func (qb *QueryBuilder) WithCustomFilter(filter CustomFilter, params any) *QueryBuilder

WithCustomFilter sets a custom filter for the query.

func (*QueryBuilder) WithCustomTableName added in v1.1.19

func (qb *QueryBuilder) WithCustomTableName(tableName string) *QueryBuilder

WithCustomTableName sets a custom table name for the query.

func (*QueryBuilder) WithFilter

func (b *QueryBuilder) WithFilter(filterOptions ...FilterApplier) *QueryBuilder

WithFilterOptions sets the filter options for the query.

func (*QueryBuilder) WithOptions

func (b *QueryBuilder) WithOptions(options ...Option) *QueryBuilder

WithOptions sets the options for the query.

func (*QueryBuilder) WithPagination

func (b *QueryBuilder) WithPagination(pagination *Pagination) *QueryBuilder

WithPagination sets the pagination for the query.

func (*QueryBuilder) WithPrewhere added in v1.1.41

func (b *QueryBuilder) WithPrewhere(prewhereOptions ...FilterApplier) *QueryBuilder

WithPrewhere sets the PREWHERE filter options for the query (ClickHouse specific). PREWHERE is executed before reading all columns, which can significantly improve performance.

func (*QueryBuilder) WithSetting added in v1.1.41

func (b *QueryBuilder) WithSetting(key string, value interface{}) *QueryBuilder

WithSetting sets a single ClickHouse query setting.

func (*QueryBuilder) WithSettings added in v1.1.41

func (b *QueryBuilder) WithSettings(settings map[string]interface{}) *QueryBuilder

WithSettings sets the ClickHouse query settings.

func (*QueryBuilder) WithSort

func (b *QueryBuilder) WithSort(sortOptions ...FilterApplier) *QueryBuilder

WithSort sets the sort options for the query.

type QueryExecer

type QueryExecer interface {
	driver.Conn
}

QueryExecer is an interface that can execute queries.

type Setting

type Setting struct {
	Id     int32
	Name   string
	Value  string
	User   *User
	UserId string
}

Setting is a struct for the "settings" table.

func (*Setting) ScanRow

func (t *Setting) ScanRow(row driver.Row) error

ScanRow scans a row into a Setting.

func (*Setting) TableName

func (t *Setting) TableName() string

TableName returns the table name.

type SettingCRUDOperations

type SettingCRUDOperations interface {
	Create(ctx context.Context, model *Setting, opts ...Option) error
	AsyncCreate(ctx context.Context, model *Setting, opts ...Option) error
	BatchCreate(ctx context.Context, models []*Setting, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*Setting, opts ...Option) error
}

SettingCRUDOperations is an interface for managing the settings table.

type SettingFilters

type SettingFilters struct {
	Id     *int32
	UserId *string
}

SettingFilters is a struct that holds filters for Setting.

type SettingRawQueryOperations

type SettingRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

SettingRawQueryOperations is an interface for executing raw queries.

type SettingRelationLoading

type SettingRelationLoading interface {
	LoadUser(ctx context.Context, model *Setting, builders ...*QueryBuilder) error
	LoadBatchUser(ctx context.Context, items []*Setting, builders ...*QueryBuilder) error
}

SettingRelationLoading is an interface for loading relations.

type SettingSearchOperations

type SettingSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*Setting, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*Setting, error)
}

SettingSearchOperations is an interface for searching the settings table.

type SettingSettings

type SettingSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) SettingStorage
	SetQueryBuilder(builder sq.StatementBuilderType) SettingStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type SettingStorage

SettingStorage is a struct for the "settings" table.

func NewSettingStorage

func NewSettingStorage(config *Config) (SettingStorage, error)

NewSettingStorage returns a new settingStorage.

type Table

type Table interface {
	TableName() string
}

type User

type User struct {
	Id                   string
	Name                 string
	Age                  int32
	Email                string
	LastName             *string
	Device               *Device
	Settings             *Setting
	Addresses            []*Address
	Posts                []*Post
	CreatedAt            time.Time
	UpdatedAt            *time.Time
	NotificationSettings *UserNotificationSetting
	Phones               UserPhonesRepeated
	Balls                UserBallsRepeated
	Numrs                UserNumrsRepeated
	Comments             UserCommentsRepeated
}

User is a struct for the "users" table.

func (*User) ScanRow

func (t *User) ScanRow(row driver.Row) error

ScanRow scans a row into a User.

func (*User) TableName

func (t *User) TableName() string

TableName returns the table name.

type UserBallsRepeated

type UserBallsRepeated struct {
	Data  []int32
	Valid bool // Valid is true if the field is not NULL
}

UserBallsRepeated is a JSON type nested in another message.

func NewBallsField

func NewBallsField(v []int32) UserBallsRepeated

NewBallsField creates a new UserBallsRepeated.

func (UserBallsRepeated) Get

func (m UserBallsRepeated) Get() []int32

Get returns the value of the field or the zero value if invalid.

func (*UserBallsRepeated) Scan

func (m *UserBallsRepeated) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (UserBallsRepeated) String

func (m UserBallsRepeated) String() string

func (UserBallsRepeated) Value

func (m UserBallsRepeated) Value() (string, error)

Value converts the struct to a JSON string.

type UserCRUDOperations

type UserCRUDOperations interface {
	Create(ctx context.Context, model *User, opts ...Option) error
	AsyncCreate(ctx context.Context, model *User, opts ...Option) error
	BatchCreate(ctx context.Context, models []*User, opts ...Option) error
	OriginalBatchCreate(ctx context.Context, models []*User, opts ...Option) error
}

UserCRUDOperations is an interface for managing the users table.

type UserComment

type UserComment struct {
	Name string           `json:"name"`
	Meta *UserCommentMeta `json:"meta"`
}

Comment is a JSON type nested in another message.

func (*UserComment) Scan

func (m *UserComment) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (*UserComment) Value

func (m *UserComment) Value() (string, error)

Value converts the struct to a JSON string.

type UserCommentMeta added in v1.1.27

type UserCommentMeta struct {
	Ip      string `json:"ip"`
	Browser string `json:"browser"`
	Os      string `json:"os"`
}

Meta is a JSON type nested in another message.

func (*UserCommentMeta) Scan added in v1.1.27

func (m *UserCommentMeta) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (*UserCommentMeta) Value added in v1.1.27

func (m *UserCommentMeta) Value() (string, error)

Value converts the struct to a JSON string.

type UserCommentsRepeated

type UserCommentsRepeated struct {
	Data  []UserComment
	Valid bool // Valid is true if the field is not NULL
}

UserCommentsRepeated is a JSON type nested in another message.

func NewCommentsField

func NewCommentsField(v []UserComment) UserCommentsRepeated

NewCommentsField creates a new UserCommentsRepeated.

func (UserCommentsRepeated) Get

Get returns the value of the field or the zero value if invalid.

func (*UserCommentsRepeated) Scan

func (m *UserCommentsRepeated) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (UserCommentsRepeated) String

func (m UserCommentsRepeated) String() string

func (UserCommentsRepeated) Value

func (m UserCommentsRepeated) Value() (string, error)

Value converts the struct to a JSON string.

type UserFilters

type UserFilters struct {
	Id    *string
	Name  *string
	Age   *int32
	Email *string
}

UserFilters is a struct that holds filters for User.

type UserNotificationSetting

type UserNotificationSetting struct {
	RegistrationEmail bool `json:"registration_email"`
	OrderEmail        bool `json:"order_email"`
}

NotificationSetting is a JSON type nested in another message.

func (*UserNotificationSetting) Scan

func (m *UserNotificationSetting) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (*UserNotificationSetting) Value

func (m *UserNotificationSetting) Value() (string, error)

Value converts the struct to a JSON string.

type UserNumr

type UserNumr struct {
	Street string `json:"street"`
	City   string `json:"city"`
	State  int32  `json:"state"`
	Zip    int64  `json:"zip"`
}

Numr is a JSON type nested in another message.

func (*UserNumr) Scan

func (m *UserNumr) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (*UserNumr) Value

func (m *UserNumr) Value() (string, error)

Value converts the struct to a JSON string.

type UserNumrsRepeated

type UserNumrsRepeated struct {
	Data  []UserNumr
	Valid bool // Valid is true if the field is not NULL
}

UserNumrsRepeated is a JSON type nested in another message.

func NewNumrsField

func NewNumrsField(v []UserNumr) UserNumrsRepeated

NewNumrsField creates a new UserNumrsRepeated.

func (UserNumrsRepeated) Get

func (m UserNumrsRepeated) Get() []UserNumr

Get returns the value of the field or the zero value if invalid.

func (*UserNumrsRepeated) Scan

func (m *UserNumrsRepeated) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (UserNumrsRepeated) String

func (m UserNumrsRepeated) String() string

func (UserNumrsRepeated) Value

func (m UserNumrsRepeated) Value() (string, error)

Value converts the struct to a JSON string.

type UserPhonesRepeated

type UserPhonesRepeated struct {
	Data  []string
	Valid bool // Valid is true if the field is not NULL
}

UserPhonesRepeated is a JSON type nested in another message.

func NewPhonesField

func NewPhonesField(v []string) UserPhonesRepeated

NewPhonesField creates a new UserPhonesRepeated.

func (UserPhonesRepeated) Get

func (m UserPhonesRepeated) Get() []string

Get returns the value of the field or the zero value if invalid.

func (*UserPhonesRepeated) Scan

func (m *UserPhonesRepeated) Scan(src interface{}) error

Scan implements the sql.Scanner interface for JSON.

func (UserPhonesRepeated) String

func (m UserPhonesRepeated) String() string

func (UserPhonesRepeated) Value

func (m UserPhonesRepeated) Value() (string, error)

Value converts the struct to a JSON string.

type UserRawQueryOperations

type UserRawQueryOperations interface {
	Select(ctx context.Context, query string, dest any, args ...any) error
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) driver.Row
	QueryRows(ctx context.Context, query string, args ...interface{}) (driver.Rows, error)
}

UserRawQueryOperations is an interface for executing raw queries.

type UserRelationLoading

type UserRelationLoading interface {
	LoadDevice(ctx context.Context, model *User, builders ...*QueryBuilder) error
	LoadSettings(ctx context.Context, model *User, builders ...*QueryBuilder) error
	LoadAddresses(ctx context.Context, model *User, builders ...*QueryBuilder) error
	LoadPosts(ctx context.Context, model *User, builders ...*QueryBuilder) error
	LoadBatchDevice(ctx context.Context, items []*User, builders ...*QueryBuilder) error
	LoadBatchSettings(ctx context.Context, items []*User, builders ...*QueryBuilder) error
	LoadBatchAddresses(ctx context.Context, items []*User, builders ...*QueryBuilder) error
	LoadBatchPosts(ctx context.Context, items []*User, builders ...*QueryBuilder) error
}

UserRelationLoading is an interface for loading relations.

type UserSearchOperations

type UserSearchOperations interface {
	FindMany(ctx context.Context, builder ...*QueryBuilder) ([]*User, error)
	FindOne(ctx context.Context, builders ...*QueryBuilder) (*User, error)
}

UserSearchOperations is an interface for searching the users table.

type UserSettings

type UserSettings interface {
	Conn() driver.Conn
	TableName() string
	SetConfig(config *Config) UserStorage
	SetQueryBuilder(builder sq.StatementBuilderType) UserStorage
	Columns() []string
	GetQueryBuilder() sq.StatementBuilderType
}

type UserStorage

UserStorage is a struct for the "users" table.

func NewUserStorage

func NewUserStorage(config *Config) (UserStorage, error)

NewUserStorage returns a new userStorage.

Jump to

Keyboard shortcuts

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