groupdb2

package
v0.0.0-...-060dca9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EMissingTable = errors.New("Missing Table")

Functions

This section is empty.

Types

type DB

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

func NewDB

func NewDB(b *bolt.DB, name []byte) *DB

func (*DB) ArticleGroupMove

func (db *DB) ArticleGroupMove(group []byte, i int64, backward bool, id_buf []byte) (ni int64, id []byte, ok bool)

func (*DB) ArticleGroupStat

func (db *DB) ArticleGroupStat(group []byte, num int64, id_buf []byte) (id []byte, ok bool)

func (*DB) AssignArticleToGroup

func (db *DB) AssignArticleToGroup(group []byte, num, exp uint64, id []byte) error

Newly introduced.

func (*DB) AssignArticleToGroups

func (db *DB) AssignArticleToGroups(groups [][]byte, nums []int64, exp uint64, id []byte) error

func (*DB) GroupHeadInsert

func (db *DB) GroupHeadInsert(groups [][]byte, buf []int64) (nums []int64, err error)

known from "github.com/maxymania/fastnntp-polyglot"

func (*DB) GroupHeadRevert

func (db *DB) GroupHeadRevert(groups [][]byte, nums []int64) error

func (*DB) GroupRealtimeQuery

func (db *DB) GroupRealtimeQuery(group []byte) (number int64, low int64, high int64, ok bool)

func (*DB) ListArticleGroupRaw

func (db *DB) ListArticleGroupRaw(group []byte, first, last int64, targ func(int64, []byte))

type Tx

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

func MakeTx

func MakeTx(bkt *bolt.Bucket) *Tx

func (Tx) ArticleGroupMove

func (t Tx) ArticleGroupMove(group []byte, i int64, backward bool, id_buf []byte) (ni int64, id []byte, ok bool)

func (Tx) ArticleGroupStat

func (t Tx) ArticleGroupStat(group []byte, num int64, id_buf []byte) ([]byte, bool)

func (Tx) AssignArticleToGroup

func (t Tx) AssignArticleToGroup(group []byte, num, exp uint64, id []byte) error

func (Tx) AssignArticleToGroups

func (t Tx) AssignArticleToGroups(groups [][]byte, nums []int64, exp uint64, id []byte) error

func (Tx) GroupHeadInsert

func (t Tx) GroupHeadInsert(groups [][]byte, buf []int64) ([]int64, error)

func (Tx) GroupHeadRevert

func (t Tx) GroupHeadRevert(groups [][]byte, nums []int64) error

func (Tx) GroupRealtimeQuery

func (t Tx) GroupRealtimeQuery(group []byte) (number int64, low int64, high int64, ok bool)

func (Tx) ListArticleGroupRaw

func (t Tx) ListArticleGroupRaw(group []byte, first, last int64, targ func(int64, []byte))

Jump to

Keyboard shortcuts

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