Documentation ¶
Index ¶
- func CreateRecord(parameters CreationParameters) error
- func Disconnect() error
- func ForceDeleteRecord(model Model) error
- func GetCount(model interface{}) (uint64, error)
- func GetRecord(query *DatabaseQuery) error
- func Instance() *gorm.DB
- func RecordExists(model Model) (bool, error)
- func SoftDeleteRecord(model Model) error
- func UpdateRecord(model Model, fieldValueMap map[string]interface{}) error
- type CreationParameters
- type DatabaseClient
- type DatabaseOrder
- type DatabaseQuery
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForceDeleteRecord ¶
Force Delete model from the database
func RecordExists ¶
Check if record already exists in the database
func SoftDeleteRecord ¶
Soft Delete model from the database
func UpdateRecord ¶
Update database record
Types ¶
type CreationParameters ¶
type DatabaseClient ¶
type DatabaseClient struct {
// contains filtered or unexported fields
}
func Initialize ¶
func Initialize(app *service.Application) *DatabaseClient
Initialize database client
func (*DatabaseClient) Connect ¶
func (client *DatabaseClient) Connect() error
Connect to the database
func (*DatabaseClient) SynchronizeWithTMDB ¶
func (client *DatabaseClient) SynchronizeWithTMDB() error
Synchronize database with TMDB sources
type DatabaseOrder ¶
type DatabaseQuery ¶
Click to show internal directories.
Click to hide internal directories.