db

package
v1.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockStore

func NewBlockStore(db *sql.DB, lock *sync.Mutex) repo.BlockStore

func NewCafeClientMessageStore

func NewCafeClientMessageStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientMessageStore

func NewCafeClientNonceStore

func NewCafeClientNonceStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientNonceStore

func NewCafeClientStore

func NewCafeClientStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientStore

func NewCafeClientThreadStore

func NewCafeClientThreadStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientThreadStore

func NewCafeMessageStore

func NewCafeMessageStore(db *sql.DB, lock *sync.Mutex) repo.CafeMessageStore

func NewCafeRequestStore

func NewCafeRequestStore(db *sql.DB, lock *sync.Mutex) repo.CafeRequestStore

func NewCafeSessionStore

func NewCafeSessionStore(db *sql.DB, lock *sync.Mutex) repo.CafeSessionStore

func NewConfigStore

func NewConfigStore(db *sql.DB, lock *sync.Mutex, path string) repo.ConfigStore

func NewContactStore

func NewContactStore(db *sql.DB, lock *sync.Mutex) repo.ContactStore

func NewFileStore

func NewFileStore(db *sql.DB, lock *sync.Mutex) repo.FileStore

func NewNotificationStore

func NewNotificationStore(db *sql.DB, lock *sync.Mutex) repo.NotificationStore

func NewProfileStore

func NewProfileStore(db *sql.DB, lock *sync.Mutex) repo.ProfileStore

func NewThreadInviteStore

func NewThreadInviteStore(db *sql.DB, lock *sync.Mutex) repo.ThreadInviteStore

func NewThreadMessageStore

func NewThreadMessageStore(db *sql.DB, lock *sync.Mutex) repo.ThreadMessageStore

func NewThreadPeerStore

func NewThreadPeerStore(db *sql.DB, lock *sync.Mutex) repo.ThreadPeerStore

func NewThreadStore

func NewThreadStore(db *sql.DB, lock *sync.Mutex) repo.ThreadStore

Types

type BlockDB

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

func (*BlockDB) Add

func (c *BlockDB) Add(block *repo.Block) error

func (*BlockDB) BeginTransaction

func (m *BlockDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*BlockDB) Count

func (c *BlockDB) Count(query string) int

func (*BlockDB) Delete

func (c *BlockDB) Delete(id string) error

func (*BlockDB) DeleteByThread

func (c *BlockDB) DeleteByThread(threadId string) error

func (*BlockDB) ExecuteQuery

func (m *BlockDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*BlockDB) Get

func (c *BlockDB) Get(id string) *repo.Block

func (*BlockDB) List

func (c *BlockDB) List(offset string, limit int, query string) []repo.Block

func (*BlockDB) PrepareAndExecuteQuery

func (m *BlockDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*BlockDB) PrepareQuery

func (m *BlockDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeClientDB

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

func (*CafeClientDB) Add

func (c *CafeClientDB) Add(client *repo.CafeClient) error

func (*CafeClientDB) BeginTransaction

func (m *CafeClientDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientDB) Count

func (c *CafeClientDB) Count() int

func (*CafeClientDB) Delete

func (c *CafeClientDB) Delete(id string) error

func (*CafeClientDB) ExecuteQuery

func (m *CafeClientDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientDB) Get

func (c *CafeClientDB) Get(id string) *repo.CafeClient

func (*CafeClientDB) List

func (c *CafeClientDB) List() []repo.CafeClient

func (*CafeClientDB) ListByAddress

func (c *CafeClientDB) ListByAddress(address string) []repo.CafeClient

func (*CafeClientDB) PrepareAndExecuteQuery

func (m *CafeClientDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientDB) PrepareQuery

func (m *CafeClientDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*CafeClientDB) UpdateLastSeen

func (c *CafeClientDB) UpdateLastSeen(id string, date time.Time) error

type CafeClientMessagesDB

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

func (*CafeClientMessagesDB) AddOrUpdate

func (c *CafeClientMessagesDB) AddOrUpdate(message *repo.CafeClientMessage) error

func (*CafeClientMessagesDB) BeginTransaction

func (m *CafeClientMessagesDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientMessagesDB) CountByClient

func (c *CafeClientMessagesDB) CountByClient(clientId string) int

func (*CafeClientMessagesDB) Delete

func (c *CafeClientMessagesDB) Delete(id string, clientId string) error

func (*CafeClientMessagesDB) DeleteByClient

func (c *CafeClientMessagesDB) DeleteByClient(clientId string, limit int) error

func (*CafeClientMessagesDB) ExecuteQuery

func (m *CafeClientMessagesDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientMessagesDB) ListByClient

func (c *CafeClientMessagesDB) ListByClient(clientId string, limit int) []repo.CafeClientMessage

func (*CafeClientMessagesDB) PrepareAndExecuteQuery

func (m *CafeClientMessagesDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientMessagesDB) PrepareQuery

func (m *CafeClientMessagesDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeClientNonceDB

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

func (*CafeClientNonceDB) Add

func (*CafeClientNonceDB) BeginTransaction

func (m *CafeClientNonceDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientNonceDB) Delete

func (c *CafeClientNonceDB) Delete(value string) error

func (*CafeClientNonceDB) ExecuteQuery

func (m *CafeClientNonceDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientNonceDB) Get

func (*CafeClientNonceDB) PrepareAndExecuteQuery

func (m *CafeClientNonceDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientNonceDB) PrepareQuery

func (m *CafeClientNonceDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeClientThreadDB

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

func (*CafeClientThreadDB) AddOrUpdate

func (c *CafeClientThreadDB) AddOrUpdate(thrd *repo.CafeClientThread) error

func (*CafeClientThreadDB) BeginTransaction

func (m *CafeClientThreadDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientThreadDB) Delete

func (c *CafeClientThreadDB) Delete(id string, clientId string) error

func (*CafeClientThreadDB) DeleteByClient

func (c *CafeClientThreadDB) DeleteByClient(clientId string) error

func (*CafeClientThreadDB) ExecuteQuery

func (m *CafeClientThreadDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientThreadDB) ListByClient

func (c *CafeClientThreadDB) ListByClient(clientId string) []repo.CafeClientThread

func (*CafeClientThreadDB) PrepareAndExecuteQuery

func (m *CafeClientThreadDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientThreadDB) PrepareQuery

func (m *CafeClientThreadDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeMessageDB

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

func (*CafeMessageDB) Add

func (c *CafeMessageDB) Add(req *repo.CafeMessage) error

func (*CafeMessageDB) BeginTransaction

func (m *CafeMessageDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeMessageDB) Delete

func (c *CafeMessageDB) Delete(id string) error

func (*CafeMessageDB) ExecuteQuery

func (m *CafeMessageDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeMessageDB) List

func (c *CafeMessageDB) List(offset string, limit int) []repo.CafeMessage

func (*CafeMessageDB) PrepareAndExecuteQuery

func (m *CafeMessageDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeMessageDB) PrepareQuery

func (m *CafeMessageDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeRequestDB

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

func (*CafeRequestDB) Add

func (c *CafeRequestDB) Add(req *repo.CafeRequest) error

func (*CafeRequestDB) BeginTransaction

func (m *CafeRequestDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeRequestDB) Delete

func (c *CafeRequestDB) Delete(id string) error

func (*CafeRequestDB) DeleteByCafe

func (c *CafeRequestDB) DeleteByCafe(cafeId string) error

func (*CafeRequestDB) ExecuteQuery

func (m *CafeRequestDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeRequestDB) List

func (c *CafeRequestDB) List(offset string, limit int) []repo.CafeRequest

func (*CafeRequestDB) PrepareAndExecuteQuery

func (m *CafeRequestDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeRequestDB) PrepareQuery

func (m *CafeRequestDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeSessionDB

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

func (*CafeSessionDB) AddOrUpdate

func (c *CafeSessionDB) AddOrUpdate(session *repo.CafeSession) error

func (*CafeSessionDB) BeginTransaction

func (m *CafeSessionDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeSessionDB) Delete

func (c *CafeSessionDB) Delete(cafeId string) error

func (*CafeSessionDB) ExecuteQuery

func (m *CafeSessionDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeSessionDB) Get

func (c *CafeSessionDB) Get(cafeId string) *repo.CafeSession

func (*CafeSessionDB) List

func (c *CafeSessionDB) List() []repo.CafeSession

func (*CafeSessionDB) PrepareAndExecuteQuery

func (m *CafeSessionDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeSessionDB) PrepareQuery

func (m *CafeSessionDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type ConfigDB

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

func (*ConfigDB) Configure

func (c *ConfigDB) Configure(accnt *keypair.Full, created time.Time) error

func (*ConfigDB) GetAccount

func (c *ConfigDB) GetAccount() (*keypair.Full, error)

func (*ConfigDB) GetCreationDate

func (c *ConfigDB) GetCreationDate() (time.Time, error)

func (*ConfigDB) Init

func (c *ConfigDB) Init(pin string) error

func (*ConfigDB) IsEncrypted

func (c *ConfigDB) IsEncrypted() bool

type ContactDB

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

func (*ContactDB) Add

func (c *ContactDB) Add(contact *repo.Contact) error

func (*ContactDB) AddOrUpdate

func (c *ContactDB) AddOrUpdate(contact *repo.Contact) error

func (*ContactDB) BeginTransaction

func (m *ContactDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ContactDB) Count

func (c *ContactDB) Count() int

func (*ContactDB) Delete

func (c *ContactDB) Delete(id string) error

func (*ContactDB) ExecuteQuery

func (m *ContactDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ContactDB) Get

func (c *ContactDB) Get(id string) *repo.Contact

func (*ContactDB) List

func (c *ContactDB) List() []repo.Contact

func (*ContactDB) ListByAddress

func (c *ContactDB) ListByAddress(address string) []repo.Contact

func (*ContactDB) PrepareAndExecuteQuery

func (m *ContactDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ContactDB) PrepareQuery

func (m *ContactDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type FileDB

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

func (*FileDB) Add

func (c *FileDB) Add(file *repo.File) error

func (*FileDB) AddTarget

func (c *FileDB) AddTarget(hash string, target string) error

func (*FileDB) BeginTransaction

func (m *FileDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*FileDB) Count

func (c *FileDB) Count() int

func (*FileDB) Delete

func (c *FileDB) Delete(hash string) error

func (*FileDB) ExecuteQuery

func (m *FileDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*FileDB) Get

func (c *FileDB) Get(hash string) *repo.File

func (*FileDB) GetByPrimary

func (c *FileDB) GetByPrimary(mill string, checksum string) *repo.File

func (*FileDB) GetBySource

func (c *FileDB) GetBySource(mill string, source string, opts string) *repo.File

func (*FileDB) PrepareAndExecuteQuery

func (m *FileDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*FileDB) PrepareQuery

func (m *FileDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*FileDB) RemoveTarget

func (c *FileDB) RemoveTarget(hash string, target string) error

type NotificationDB

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

func (*NotificationDB) Add

func (c *NotificationDB) Add(notification *repo.Notification) error

func (*NotificationDB) BeginTransaction

func (m *NotificationDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*NotificationDB) CountUnread

func (c *NotificationDB) CountUnread() int

func (*NotificationDB) Delete

func (c *NotificationDB) Delete(id string) error

func (*NotificationDB) DeleteByActor

func (c *NotificationDB) DeleteByActor(actorId string) error

func (*NotificationDB) DeleteByBlock

func (c *NotificationDB) DeleteByBlock(blockId string) error

func (*NotificationDB) DeleteBySubject

func (c *NotificationDB) DeleteBySubject(subjectId string) error

func (*NotificationDB) ExecuteQuery

func (m *NotificationDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*NotificationDB) Get

func (c *NotificationDB) Get(id string) *repo.Notification

func (*NotificationDB) List

func (c *NotificationDB) List(offset string, limit int) []repo.Notification

func (*NotificationDB) PrepareAndExecuteQuery

func (m *NotificationDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*NotificationDB) PrepareQuery

func (m *NotificationDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*NotificationDB) Read

func (c *NotificationDB) Read(id string) error

func (*NotificationDB) ReadAll

func (c *NotificationDB) ReadAll() error

type ProfileDB

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

func (*ProfileDB) GetAvatar

func (c *ProfileDB) GetAvatar() (*string, error)

func (*ProfileDB) GetUsername

func (c *ProfileDB) GetUsername() (*string, error)

func (*ProfileDB) SetAvatar

func (c *ProfileDB) SetAvatar(uri string) error

func (*ProfileDB) SetUsername

func (c *ProfileDB) SetUsername(username string) error

type SQLiteDatastore

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

func Create

func Create(repoPath, pin string) (*SQLiteDatastore, error)

func (*SQLiteDatastore) Blocks

func (d *SQLiteDatastore) Blocks() repo.BlockStore

func (*SQLiteDatastore) CafeClientMessages

func (d *SQLiteDatastore) CafeClientMessages() repo.CafeClientMessageStore

func (*SQLiteDatastore) CafeClientNonces

func (d *SQLiteDatastore) CafeClientNonces() repo.CafeClientNonceStore

func (*SQLiteDatastore) CafeClientThreads

func (d *SQLiteDatastore) CafeClientThreads() repo.CafeClientThreadStore

func (*SQLiteDatastore) CafeClients

func (d *SQLiteDatastore) CafeClients() repo.CafeClientStore

func (*SQLiteDatastore) CafeMessages

func (d *SQLiteDatastore) CafeMessages() repo.CafeMessageStore

func (*SQLiteDatastore) CafeRequests

func (d *SQLiteDatastore) CafeRequests() repo.CafeRequestStore

func (*SQLiteDatastore) CafeSessions

func (d *SQLiteDatastore) CafeSessions() repo.CafeSessionStore

func (*SQLiteDatastore) Close

func (d *SQLiteDatastore) Close()

func (*SQLiteDatastore) Config

func (d *SQLiteDatastore) Config() repo.ConfigStore

func (*SQLiteDatastore) Contacts

func (d *SQLiteDatastore) Contacts() repo.ContactStore

func (*SQLiteDatastore) Copy

func (d *SQLiteDatastore) Copy(dbPath string, pin string) error

func (*SQLiteDatastore) Files

func (d *SQLiteDatastore) Files() repo.FileStore

func (*SQLiteDatastore) InitTables

func (d *SQLiteDatastore) InitTables(pin string) error

func (*SQLiteDatastore) Notifications

func (d *SQLiteDatastore) Notifications() repo.NotificationStore

func (*SQLiteDatastore) Ping

func (d *SQLiteDatastore) Ping() error

func (*SQLiteDatastore) Profile

func (d *SQLiteDatastore) Profile() repo.ProfileStore

func (*SQLiteDatastore) ThreadInvites

func (d *SQLiteDatastore) ThreadInvites() repo.ThreadInviteStore

func (*SQLiteDatastore) ThreadMessages

func (d *SQLiteDatastore) ThreadMessages() repo.ThreadMessageStore

func (*SQLiteDatastore) ThreadPeers

func (d *SQLiteDatastore) ThreadPeers() repo.ThreadPeerStore

func (*SQLiteDatastore) Threads

func (d *SQLiteDatastore) Threads() repo.ThreadStore

type ThreadDB

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

func (*ThreadDB) Add

func (c *ThreadDB) Add(thread *repo.Thread) error

func (*ThreadDB) BeginTransaction

func (m *ThreadDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ThreadDB) Count

func (c *ThreadDB) Count() int

func (*ThreadDB) Delete

func (c *ThreadDB) Delete(id string) error

func (*ThreadDB) ExecuteQuery

func (m *ThreadDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ThreadDB) Get

func (c *ThreadDB) Get(id string) *repo.Thread

func (*ThreadDB) GetByKey

func (c *ThreadDB) GetByKey(key string) *repo.Thread

func (*ThreadDB) List

func (c *ThreadDB) List() []repo.Thread

func (*ThreadDB) PrepareAndExecuteQuery

func (m *ThreadDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ThreadDB) PrepareQuery

func (m *ThreadDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*ThreadDB) UpdateHead

func (c *ThreadDB) UpdateHead(id string, head string) error

type ThreadInviteDB

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

func (*ThreadInviteDB) Add

func (c *ThreadInviteDB) Add(invite *repo.ThreadInvite) error

func (*ThreadInviteDB) BeginTransaction

func (m *ThreadInviteDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ThreadInviteDB) Delete

func (c *ThreadInviteDB) Delete(id string) error

func (*ThreadInviteDB) ExecuteQuery

func (m *ThreadInviteDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ThreadInviteDB) Get

func (c *ThreadInviteDB) Get(id string) *repo.ThreadInvite

func (*ThreadInviteDB) List

func (c *ThreadInviteDB) List() []repo.ThreadInvite

func (*ThreadInviteDB) PrepareAndExecuteQuery

func (m *ThreadInviteDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ThreadInviteDB) PrepareQuery

func (m *ThreadInviteDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type ThreadMessageDB

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

func (*ThreadMessageDB) Add

func (c *ThreadMessageDB) Add(msg *repo.ThreadMessage) error

func (*ThreadMessageDB) BeginTransaction

func (m *ThreadMessageDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ThreadMessageDB) Delete

func (c *ThreadMessageDB) Delete(id string) error

func (*ThreadMessageDB) ExecuteQuery

func (m *ThreadMessageDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ThreadMessageDB) List

func (c *ThreadMessageDB) List(offset string, limit int) []repo.ThreadMessage

func (*ThreadMessageDB) PrepareAndExecuteQuery

func (m *ThreadMessageDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ThreadMessageDB) PrepareQuery

func (m *ThreadMessageDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type ThreadPeerDB

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

func (*ThreadPeerDB) Add

func (c *ThreadPeerDB) Add(peer *repo.ThreadPeer) error

func (*ThreadPeerDB) BeginTransaction

func (m *ThreadPeerDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ThreadPeerDB) Count

func (c *ThreadPeerDB) Count(distinct bool) int

func (*ThreadPeerDB) Delete

func (c *ThreadPeerDB) Delete(id string, threadId string) error

func (*ThreadPeerDB) DeleteById

func (c *ThreadPeerDB) DeleteById(id string) error

func (*ThreadPeerDB) DeleteByThread

func (c *ThreadPeerDB) DeleteByThread(threadId string) error

func (*ThreadPeerDB) ExecuteQuery

func (m *ThreadPeerDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ThreadPeerDB) List

func (c *ThreadPeerDB) List() []repo.ThreadPeer

func (*ThreadPeerDB) ListById

func (c *ThreadPeerDB) ListById(id string) []repo.ThreadPeer

func (*ThreadPeerDB) ListByThread

func (c *ThreadPeerDB) ListByThread(threadId string) []repo.ThreadPeer

func (*ThreadPeerDB) ListUnwelcomedByThread

func (c *ThreadPeerDB) ListUnwelcomedByThread(threadId string) []repo.ThreadPeer

func (*ThreadPeerDB) PrepareAndExecuteQuery

func (m *ThreadPeerDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ThreadPeerDB) PrepareQuery

func (m *ThreadPeerDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*ThreadPeerDB) WelcomeByThread

func (c *ThreadPeerDB) WelcomeByThread(threadId string) error

Jump to

Keyboard shortcuts

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