Documentation ¶
Overview ¶
Package sqldb provides a database handle backed by a PostgreSQL database.
Index ¶
- type DB
- func (db *DB) Begin(ctx context.Context) (db.Tx, error)
- func (db *DB) CreateTask(tx db.Tx, creatorID todo.UserID) (todo.TaskID, error)
- func (db *DB) CreateUser(tx db.Tx, authProviderType authn.Provider, authProviderId authn.UserID, ...) (todo.UserID, error)
- func (d *DB) DeleteTask(tx db.Tx, taskID todo.TaskID) error
- func (db *DB) NoTxn(ctx context.Context) db.Tx
- func (db *DB) RunOrContinueTransaction(in db.Tx, fn func(db.Tx) error) error
- func (db *DB) Task(tx db.Tx, id todo.TaskID) (*todo.Task, error)
- func (db *DB) TasksByCreator(tx db.Tx, creatorID todo.UserID) ([]*todo.Task, error)
- func (db *DB) Transactional(ctx context.Context, fn func(tx db.Tx) error) error
- func (d *DB) UpdateTask(tx db.Tx, taskID todo.TaskID, taskMutations ...db.UpdateTaskFn) error
- func (d *DB) UpdateUser(tx db.Tx, userID todo.UserID, userMutations ...db.UpdateUserFn) error
- func (db *DB) User(tx db.Tx, id todo.UserID) (*todo.User, error)
- func (d *DB) UserByAuthnProvider(tx db.Tx, authnProvider authn.Provider, authnProvidedUserID authn.UserID) (*todo.User, error)
- func (db *DB) Users(tx db.Tx) ([]*todo.User, error)
- type DBConn
- type SQL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateTask ¶
func (*DB) CreateUser ¶
func (*DB) RunOrContinueTransaction ¶
func (*DB) TasksByCreator ¶
func (*DB) Transactional ¶
func (*DB) UpdateTask ¶
func (*DB) UpdateUser ¶
func (*DB) UserByAuthnProvider ¶
Click to show internal directories.
Click to hide internal directories.