storage

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MySQLPrefix         = "mysql://"
	MongoPrefix         = "mongodb://"
	MongoSrvPrefix      = "mongodb+srv://"
	PostgresPrefix      = "postgres://"
	PostgreSQLPrefix    = "postgresql://"
	ClickhousePrefix    = "clickhouse://"
	CHHTTPPrefix        = "chhttp://"
	CHHTTPSPrefix       = "chhttps://"
	SQLitePrefix        = "sqlite://"
	RedisPrefix         = "redis://"
	RedissPrefix        = "rediss://"
	RedisClusterPrefix  = "redis+cluster://"
	RedissClusterPrefix = "rediss+cluster://"
)

Variables

This section is empty.

Functions

func AppendMySQLParams

func AppendMySQLParams(dsn string, params map[string]string) (string, error)

func AppendURLParams

func AppendURLParams(rawURL string, params []lo.Tuple2[string, string]) (string, error)

func NewGORMConfig

func NewGORMConfig(tablePrefix string) *gorm.Config

func ProbeMySQLIsolationVariableName

func ProbeMySQLIsolationVariableName(dsn string) (string, error)

Types

type Option

type Option func(*Options)

func WithIsolationLevel

func WithIsolationLevel(isolationLevel string) Option

type Options

type Options struct {
	IsolationLevel string
}

func NewOptions

func NewOptions(opts ...Option) Options

type TablePrefix

type TablePrefix string

func (TablePrefix) AggregatingFeedbackTable

func (tp TablePrefix) AggregatingFeedbackTable() string

AggregatingFeedbackTable returns the aggregating feedback table.

func (TablePrefix) DocumentTable

func (tp TablePrefix) DocumentTable() string

func (TablePrefix) FeedbackTable

func (tp TablePrefix) FeedbackTable() string

func (TablePrefix) ItemFeedbackTable

func (tp TablePrefix) ItemFeedbackTable() string

ItemFeedbackTable returns the materialized view of item feedback.

func (TablePrefix) ItemsTable

func (tp TablePrefix) ItemsTable() string

func (TablePrefix) Key

func (tp TablePrefix) Key(key string) string

func (TablePrefix) LatestItemsTable

func (tp TablePrefix) LatestItemsTable() string

LatestItemsTable returns the materialized view for latest items.

func (TablePrefix) MessageTable

func (tp TablePrefix) MessageTable() string

func (TablePrefix) PointsTable

func (tp TablePrefix) PointsTable() string

func (TablePrefix) SetsTable

func (tp TablePrefix) SetsTable() string

func (TablePrefix) UserFeedbackTable

func (tp TablePrefix) UserFeedbackTable() string

UserFeedbackTable returns the materialized view of user feedback.

func (TablePrefix) UsersTable

func (tp TablePrefix) UsersTable() string

func (TablePrefix) ValuesTable

func (tp TablePrefix) ValuesTable() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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