Documentation ¶
Overview ¶
Package database defines the content database.
Package database defines the content database.
Index ¶
- Variables
- type DB
- func (db *DB) Begin() (*Tx, error)
- func (db *DB) Close() error
- func (db *DB) ExtractExists(id content.ExtractId) (bool, error)
- func (db *DB) ExtractHasExisted(id content.ExtractId) (bool, error)
- func (db *DB) ExtractLanguages() ([]language.Code, error)
- func (db *DB) ExtractList() ([]*content.Extract, error)
- func (db *DB) ExtractListWithLanguage(lang language.Code) ([]*content.Extract, error)
- func (db *DB) ExtractListWithLanguages(langA, langB language.Code) ([]*content.Extract, error)
- func (db *DB) FlavorExists(extractId content.ExtractId, lang language.Code, flavorType content.FlavorType, ...) (bool, error)
- func (db *DB) GetExtract(id content.ExtractId) (*content.Extract, error)
- func (db *DB) InsertOrUpdateUnits(author user.Name, units []*content.Unit) error
- func (db *DB) NewExtract(author user.Name, e *content.Extract) error
- func (db *DB) NewFlavor(author user.Name, f *content.Flavor) error
- func (db *DB) SlugToIdMap() (map[string]content.ExtractId, error)
- func (db *DB) UpdateExtract(author user.Name, e *content.Extract) error
- func (db *DB) UpdateFlavor(author user.Name, f *content.Flavor) error
- type Tx
- func (tx *Tx) InsertOrUpdateVersioned(table string, author user.Name, id *primaryKey, kvPairs interface{}) error
- func (tx *Tx) InsertVersioned(table string, author user.Name, values ...interface{}) error
- func (tx *Tx) InsertVersionedFlavor(author user.Name, f *content.Flavor) error
- func (tx *Tx) LatestVersion(table string, id *primaryKey) (*content.Version, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtractNotFound = errors.New("Extract not found")
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) ExtractListWithLanguage ¶
func (*DB) ExtractListWithLanguages ¶
func (*DB) FlavorExists ¶
func (*DB) InsertOrUpdateUnits ¶
type Tx ¶
func (*Tx) InsertOrUpdateVersioned ¶
func (*Tx) InsertVersioned ¶
func (*Tx) InsertVersionedFlavor ¶
Click to show internal directories.
Click to hide internal directories.