dbo

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TableThreadSubscriptions = "ThreadSubscriptions"
	TableUserSubscriptions   = "UserSubscriptions"
)
View Source
const (
	DbPsid_CountUserSubscriptions        = 0
	DbPsid_CountThreadSubscriptions      = 1
	DbPsid_InitUserSubscriptions         = 2
	DbPsid_InitThreadSubscriptions       = 3
	DbPsid_GetUserSubscriptions          = 4
	DbPsid_GetThreadSubscriptions        = 5
	DbPsid_SaveUserSubscriptions         = 6
	DbPsid_SaveThreadSubscriptions       = 7
	DbPsid_ClearThreadSubscriptionRecord = 8
)

Indices of prepared statements.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseObject

type DatabaseObject struct {
	cdbo.DatabaseObject
	// contains filtered or unexported fields
}

func NewDatabaseObject

func NewDatabaseObject(settings ss.DbSettings) (dbo *DatabaseObject)

func (*DatabaseObject) ClearThreadSubscriptionRecord

func (dbo *DatabaseObject) ClearThreadSubscriptionRecord(threadId uint) (err error)

func (*DatabaseObject) CountThreadSubscriptions

func (dbo *DatabaseObject) CountThreadSubscriptions(threadId uint) (n int, err error)

func (*DatabaseObject) CountUserSubscriptions

func (dbo *DatabaseObject) CountUserSubscriptions(userId uint) (n int, err error)

func (*DatabaseObject) GetPreparedStatementByIndex

func (dbo *DatabaseObject) GetPreparedStatementByIndex(i int) (ps *sql.Stmt)

func (*DatabaseObject) GetThreadSubscriptions

func (dbo *DatabaseObject) GetThreadSubscriptions(threadId uint) (ts *sm.ThreadSubscriptions, err error)

func (*DatabaseObject) GetUserSubscriptions

func (dbo *DatabaseObject) GetUserSubscriptions(userId uint) (us *sm.UserSubscriptions, err error)

func (*DatabaseObject) Init

func (dbo *DatabaseObject) Init() (err error)

Init connects to the database, initialises the tables and prepares SQL statements.

func (*DatabaseObject) InitThreadSubscriptions

func (dbo *DatabaseObject) InitThreadSubscriptions(threadId uint) (err error)

func (*DatabaseObject) InitUserSubscriptions

func (dbo *DatabaseObject) InitUserSubscriptions(userId uint) (err error)

func (*DatabaseObject) SaveThreadSubscriptions

func (dbo *DatabaseObject) SaveThreadSubscriptions(ts *sm.ThreadSubscriptions) (err error)

func (*DatabaseObject) SaveUserSubscriptions

func (dbo *DatabaseObject) SaveUserSubscriptions(us *sm.UserSubscriptions) (err error)

type TableNames

type TableNames struct {
	ThreadSubscriptions string
	UserSubscriptions   string
}

Jump to

Keyboard shortcuts

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