Documentation ¶
Index ¶
- Constants
- type DatabaseObject
- func (dbo *DatabaseObject) ClearThreadSubscriptionRecord(threadId uint) (err error)
- func (dbo *DatabaseObject) CountThreadSubscriptions(threadId uint) (n int, err error)
- func (dbo *DatabaseObject) CountUserSubscriptions(userId uint) (n int, err error)
- func (dbo *DatabaseObject) GetPreparedStatementByIndex(i int) (ps *sql.Stmt)
- func (dbo *DatabaseObject) GetThreadSubscriptions(threadId uint) (ts *sm.ThreadSubscriptions, err error)
- func (dbo *DatabaseObject) GetUserSubscriptions(userId uint) (us *sm.UserSubscriptions, err error)
- func (dbo *DatabaseObject) Init() (err error)
- func (dbo *DatabaseObject) InitThreadSubscriptions(threadId uint) (err error)
- func (dbo *DatabaseObject) InitUserSubscriptions(userId uint) (err error)
- func (dbo *DatabaseObject) SaveThreadSubscriptions(ts *sm.ThreadSubscriptions) (err error)
- func (dbo *DatabaseObject) SaveUserSubscriptions(us *sm.UserSubscriptions) (err error)
- type TableNames
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 ¶
Click to show internal directories.
Click to hide internal directories.