dbo

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 8 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
	DbPsid_GetAllThreadSubscriptions     = 9
	DbPsid_GetAllUserSubscriptions       = 10
)

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 base2.Id) (err error)

func (*DatabaseObject) CountThreadSubscriptions

func (dbo *DatabaseObject) CountThreadSubscriptions(threadId base2.Id) (n base2.Count, err error)

func (*DatabaseObject) CountUserSubscriptions

func (dbo *DatabaseObject) CountUserSubscriptions(userId base2.Id) (n base2.Count, err error)

func (*DatabaseObject) GetAllThreadSubscriptions added in v0.0.55

func (dbo *DatabaseObject) GetAllThreadSubscriptions() (tsrs []sm.ThreadSubscriptionsRecord, err error)

func (*DatabaseObject) GetAllUserSubscriptions added in v0.0.55

func (dbo *DatabaseObject) GetAllUserSubscriptions() (usrs []sm.UserSubscriptionsRecord, err error)

func (*DatabaseObject) GetPreparedStatementByIndex

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

func (*DatabaseObject) GetThreadSubscriptions

func (dbo *DatabaseObject) GetThreadSubscriptions(threadId base2.Id) (tsr *sm.ThreadSubscriptionsRecord, err error)

func (*DatabaseObject) GetUserSubscriptions

func (dbo *DatabaseObject) GetUserSubscriptions(userId base2.Id) (usr *sm.UserSubscriptionsRecord, 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 base2.Id) (err error)

func (*DatabaseObject) InitUserSubscriptions

func (dbo *DatabaseObject) InitUserSubscriptions(userId base2.Id) (err error)

func (*DatabaseObject) SaveThreadSubscriptions

func (dbo *DatabaseObject) SaveThreadSubscriptions(tsr *sm.ThreadSubscriptionsRecord) (err error)

func (*DatabaseObject) SaveUserSubscriptions

func (dbo *DatabaseObject) SaveUserSubscriptions(usr *sm.UserSubscriptionsRecord) (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