sqldb

package
v0.0.0-...-aaf6028 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MsSqlDialect = &Dialect{
	Binary: "varbinary",
	Int64:  "bigint",
	Date:   "date",
}

Microsoft SQL Server (untested)

View Source
var PgDialect = &Dialect{
	Binary: "bytea",
	Int64:  "bigint",
	Date:   "date",
}

PostgreSQL

Functions

This section is empty.

Types

type Base

type Base struct {
	DB *sql.DB
}

func (*Base) CreateSqlModel

func (b *Base) CreateSqlModel(d *sqlutil.Dialect) error

func (*Base) CreateTables

func (b *Base) CreateTables(d *Dialect) error

func (*Base) Expire

func (b *Base) Expire(expire time.Time) error

func (*Base) InsertGoupMapping

func (b *Base) InsertGoupMapping(group []byte, num int64, msgid []byte, expire time.Time) error

func (*Base) InsertIDMapping

func (b *Base) InsertIDMapping(msgid, bucket []byte, expire time.Time) error

func (*Base) QueryGroupList

func (b *Base) QueryGroupList(group []byte, first, last int64, targ func(num int64, bucket, msgid bufferex.Binary)) error

func (*Base) QueryGroupMapping

func (b *Base) QueryGroupMapping(group []byte, num int64) (msgid, bucket bufferex.Binary, err error)

func (*Base) QueryGroupShift

func (b *Base) QueryGroupShift(group []byte, num int64, backward bool) (nxt int64, msgid bufferex.Binary, err error)

func (*Base) QueryIDMapping

func (b *Base) QueryIDMapping(msgid []byte) (bucket bufferex.Binary, err error)

type Dialect

type Dialect struct {
	Binary, Int64, Date string
}

Jump to

Keyboard shortcuts

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