modelx

package
v0.63.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewConn added in v0.51.0

func MustNewConn(c sqlx.SqlConf) sqlx.SqlConn

func NewConnWithCache added in v0.51.0

func NewConnWithCache(db sqlx.SqlConn, c cache.Cache) sqlc.CachedConn

NewConnWithCache returns a CachedConn with a custom cache.

func WithCacheConf

func WithCacheConf(cacheConf cache.CacheConf) opts.Opt[ModelOpts]

func WithCacheOpts

func WithCacheOpts(cacheOpts ...cache.Option) opts.Opt[ModelOpts]

func WithCachedConn

func WithCachedConn(cachedConn sqlc.CachedConn) opts.Opt[ModelOpts]

Types

type ModelOpts

type ModelOpts struct {
	CachedConn *sqlc.CachedConn
	CacheConf  cache.CacheConf
	CacheOpts  []cache.Option
}

func (ModelOpts) DefaultOptions

func (opts ModelOpts) DefaultOptions() ModelOpts

Jump to

Keyboard shortcuts

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