afs

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 20 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	NotExistStatus = iota
	InUseStatus
	ErrorStatus
	ExistsStatus
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(URL string, ttl time.Duration, signature string, stream *option.Stream, options ...interface{}) (*Cache, error)

NewCache creates new cache.

func (*Cache) AddValues

func (c *Cache) AddValues(ctx context.Context, e *cache.Entry, values []interface{}) error

func (*Cache) AsSource

func (c *Cache) AsSource(ctx context.Context, entry *cache.Entry) (cache.Source, error)

func (*Cache) AssignRows

func (c *Cache) AssignRows(entry *cache.Entry, rows *sql.Rows) error

func (*Cache) Close

func (c *Cache) Close(ctx context.Context, e *cache.Entry) error

func (*Cache) Delete

func (c *Cache) Delete(ctx context.Context, entry *cache.Entry) error

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, SQL string, args []interface{}, options ...interface{}) (result *cache.Entry, readErr error)

func (*Cache) IndexBy

func (c *Cache) IndexBy(ctx context.Context, db *sql.DB, column, SQL string, args []interface{}, options ...interface{}) (int, error)

IndexBy warms the exact SQL-and-arguments cache entry using the same native writer as lazy reads. A column creates native group entries for matcher reads.

func (*Cache) Lookup added in v0.26.0

func (c *Cache) Lookup(ctx context.Context, SQL string, args []interface{}, options ...interface{}) (*cache.Entry, error)

func (*Cache) Rollback

func (c *Cache) Rollback(ctx context.Context, entry *cache.Entry) error

func (*Cache) UpdateType

func (c *Cache) UpdateType(ctx context.Context, entry *cache.Entry, values []interface{}) (bool, error)

type Source

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

func (*Source) CheckType

func (s *Source) CheckType(ctx context.Context, values []interface{}) (bool, error)

func (*Source) Close

func (s *Source) Close(ctx context.Context) error

func (*Source) ConvertColumns

func (s *Source) ConvertColumns() ([]io.Column, error)

func (*Source) Err added in v0.14.0

func (s *Source) Err() error

func (*Source) Next

func (s *Source) Next() bool

func (*Source) Rollback

func (s *Source) Rollback(ctx context.Context) error

func (*Source) Scanner

func (s *Source) Scanner(context.Context) cache.ScannerFn

func (*Source) XTypes

func (s *Source) XTypes() []*xunsafe.Type

Jump to

Keyboard shortcuts

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