Versions in this module Expand all Collapse all v5 v5.6.0 Jan 31, 2024 v5.5.0 Jan 30, 2024 v5.4.0 Jan 30, 2024 v5.3.0 Dec 16, 2023 v5.2.0 Dec 14, 2023 v5.1.0 Jul 31, 2023 v5.0.0 Jun 26, 2023 Changes in this version + func Errorf(s string, v ...interface{}) + func Logf(s string, v ...interface{}) + func SetErrorLogger(logger interface{}) + func SetLogger(logger interface{}) + type AuthGroup struct + ID int + Name string + func AuthGroupByID(ctx context.Context, db DB, id int) (*AuthGroup, error) + func AuthGroupByName(ctx context.Context, db DB, name string) (*AuthGroup, error) + func (ag *AuthGroup) Delete(ctx context.Context, db DB) error + func (ag *AuthGroup) Deleted() bool + func (ag *AuthGroup) Exists() bool + func (ag *AuthGroup) Insert(ctx context.Context, db DB) error + func (ag *AuthGroup) Save(ctx context.Context, db DB) error + func (ag *AuthGroup) Update(ctx context.Context, db DB) error + func (ag *AuthGroup) Upsert(ctx context.Context, db DB) error + type AuthGroupPermission struct + GroupID int + ID int64 + PermissionID int + func AuthGroupPermissionByGroupIDPermissionID(ctx context.Context, db DB, groupID, permissionID int) (*AuthGroupPermission, error) + func AuthGroupPermissionByID(ctx context.Context, db DB, id int64) (*AuthGroupPermission, error) + func AuthGroupPermissionsByGroupID(ctx context.Context, db DB, groupID int) ([]*AuthGroupPermission, error) + func AuthGroupPermissionsByPermissionID(ctx context.Context, db DB, permissionID int) ([]*AuthGroupPermission, error) + func (agp *AuthGroupPermission) AuthGroup(ctx context.Context, db DB) (*AuthGroup, error) + func (agp *AuthGroupPermission) AuthPermission(ctx context.Context, db DB) (*AuthPermission, error) + func (agp *AuthGroupPermission) Delete(ctx context.Context, db DB) error + func (agp *AuthGroupPermission) Deleted() bool + func (agp *AuthGroupPermission) Exists() bool + func (agp *AuthGroupPermission) Insert(ctx context.Context, db DB) error + func (agp *AuthGroupPermission) Save(ctx context.Context, db DB) error + func (agp *AuthGroupPermission) Update(ctx context.Context, db DB) error + func (agp *AuthGroupPermission) Upsert(ctx context.Context, db DB) error + type AuthPermission struct + Codename string + ContentTypeID int + ID int + Name string + func AuthPermissionByContentTypeID(ctx context.Context, db DB, contentTypeID int) ([]*AuthPermission, error) + func AuthPermissionByContentTypeIDCodename(ctx context.Context, db DB, contentTypeID int, codename string) (*AuthPermission, error) + func AuthPermissionByID(ctx context.Context, db DB, id int) (*AuthPermission, error) + func (ap *AuthPermission) Delete(ctx context.Context, db DB) error + func (ap *AuthPermission) Deleted() bool + func (ap *AuthPermission) DjangoContentType(ctx context.Context, db DB) (*DjangoContentType, error) + func (ap *AuthPermission) Exists() bool + func (ap *AuthPermission) Insert(ctx context.Context, db DB) error + func (ap *AuthPermission) Save(ctx context.Context, db DB) error + func (ap *AuthPermission) Update(ctx context.Context, db DB) error + func (ap *AuthPermission) Upsert(ctx context.Context, db DB) error + type AuthUser struct + DateJoined time.Time + Email string + FirstName string + ID int + IsActive bool + IsStaff bool + IsSuperuser bool + LastLogin sql.NullTime + LastName string + Password string + Username string + func AuthUserByID(ctx context.Context, db DB, id int) (*AuthUser, error) + func AuthUserByUsername(ctx context.Context, db DB, username string) (*AuthUser, error) + func (au *AuthUser) Delete(ctx context.Context, db DB) error + func (au *AuthUser) Deleted() bool + func (au *AuthUser) Exists() bool + func (au *AuthUser) Insert(ctx context.Context, db DB) error + func (au *AuthUser) Save(ctx context.Context, db DB) error + func (au *AuthUser) Update(ctx context.Context, db DB) error + func (au *AuthUser) Upsert(ctx context.Context, db DB) error + type AuthUserGroup struct + GroupID int + ID int64 + UserID int + func AuthUserGroupByID(ctx context.Context, db DB, id int64) (*AuthUserGroup, error) + func AuthUserGroupByUserIDGroupID(ctx context.Context, db DB, userID, groupID int) (*AuthUserGroup, error) + func AuthUserGroupsByGroupID(ctx context.Context, db DB, groupID int) ([]*AuthUserGroup, error) + func AuthUserGroupsByUserID(ctx context.Context, db DB, userID int) ([]*AuthUserGroup, error) + func (aug *AuthUserGroup) AuthGroup(ctx context.Context, db DB) (*AuthGroup, error) + func (aug *AuthUserGroup) AuthUser(ctx context.Context, db DB) (*AuthUser, error) + func (aug *AuthUserGroup) Delete(ctx context.Context, db DB) error + func (aug *AuthUserGroup) Deleted() bool + func (aug *AuthUserGroup) Exists() bool + func (aug *AuthUserGroup) Insert(ctx context.Context, db DB) error + func (aug *AuthUserGroup) Save(ctx context.Context, db DB) error + func (aug *AuthUserGroup) Update(ctx context.Context, db DB) error + func (aug *AuthUserGroup) Upsert(ctx context.Context, db DB) error + type AuthUserUserPermission struct + ID int64 + PermissionID int + UserID int + func AuthUserUserPermissionByID(ctx context.Context, db DB, id int64) (*AuthUserUserPermission, error) + func AuthUserUserPermissionByUserIDPermissionID(ctx context.Context, db DB, userID, permissionID int) (*AuthUserUserPermission, error) + func AuthUserUserPermissionsByPermissionID(ctx context.Context, db DB, permissionID int) ([]*AuthUserUserPermission, error) + func AuthUserUserPermissionsByUserID(ctx context.Context, db DB, userID int) ([]*AuthUserUserPermission, error) + func (auup *AuthUserUserPermission) AuthPermission(ctx context.Context, db DB) (*AuthPermission, error) + func (auup *AuthUserUserPermission) AuthUser(ctx context.Context, db DB) (*AuthUser, error) + func (auup *AuthUserUserPermission) Delete(ctx context.Context, db DB) error + func (auup *AuthUserUserPermission) Deleted() bool + func (auup *AuthUserUserPermission) Exists() bool + func (auup *AuthUserUserPermission) Insert(ctx context.Context, db DB) error + func (auup *AuthUserUserPermission) Save(ctx context.Context, db DB) error + func (auup *AuthUserUserPermission) Update(ctx context.Context, db DB) error + func (auup *AuthUserUserPermission) Upsert(ctx context.Context, db DB) error + type Author struct + AuthorID int64 + Name string + func AuthorByAuthorID(ctx context.Context, db DB, authorID int64) (*Author, error) + func (a *Author) Delete(ctx context.Context, db DB) error + func (a *Author) Deleted() bool + func (a *Author) Exists() bool + func (a *Author) Insert(ctx context.Context, db DB) error + func (a *Author) Save(ctx context.Context, db DB) error + func (a *Author) Update(ctx context.Context, db DB) error + func (a *Author) Upsert(ctx context.Context, db DB) error + type Book struct + Available time.Time + BookID int64 + BookType int + BooksAuthorIDFkey int64 + ISBN string + Title string + Year int + func BookByBookID(ctx context.Context, db DB, bookID int64) (*Book, error) + func BooksByBooksAuthorIDFkey(ctx context.Context, db DB, booksAuthorIDFkey int64) ([]*Book, error) + func (b *Book) Author(ctx context.Context, db DB) (*Author, error) + func (b *Book) Delete(ctx context.Context, db DB) error + func (b *Book) Deleted() bool + func (b *Book) Exists() bool + func (b *Book) Insert(ctx context.Context, db DB) error + func (b *Book) Save(ctx context.Context, db DB) error + func (b *Book) Update(ctx context.Context, db DB) error + func (b *Book) Upsert(ctx context.Context, db DB) error + type BooksTag struct + BookID int64 + ID int64 + TagID int64 + func BooksTagByBookIDTagID(ctx context.Context, db DB, bookID, tagID int64) (*BooksTag, error) + func BooksTagByID(ctx context.Context, db DB, id int64) (*BooksTag, error) + func BooksTagsByBookID(ctx context.Context, db DB, bookID int64) ([]*BooksTag, error) + func BooksTagsByTagID(ctx context.Context, db DB, tagID int64) ([]*BooksTag, error) + func (bt *BooksTag) Book(ctx context.Context, db DB) (*Book, error) + func (bt *BooksTag) Delete(ctx context.Context, db DB) error + func (bt *BooksTag) Deleted() bool + func (bt *BooksTag) Exists() bool + func (bt *BooksTag) Insert(ctx context.Context, db DB) error + func (bt *BooksTag) Save(ctx context.Context, db DB) error + func (bt *BooksTag) Tag(ctx context.Context, db DB) (*Tag, error) + func (bt *BooksTag) Update(ctx context.Context, db DB) error + func (bt *BooksTag) Upsert(ctx context.Context, db DB) error + type DB interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type DjangoAdminLog struct + ActionFlag int16 + ActionTime time.Time + ChangeMessage string + ContentTypeID sql.NullInt64 + ID int + ObjectID sql.NullString + ObjectRepr string + UserID int + func DjangoAdminLogByContentTypeID(ctx context.Context, db DB, contentTypeID sql.NullInt64) ([]*DjangoAdminLog, error) + func DjangoAdminLogByID(ctx context.Context, db DB, id int) (*DjangoAdminLog, error) + func DjangoAdminLogByUserID(ctx context.Context, db DB, userID int) ([]*DjangoAdminLog, error) + func (dal *DjangoAdminLog) AuthUser(ctx context.Context, db DB) (*AuthUser, error) + func (dal *DjangoAdminLog) Delete(ctx context.Context, db DB) error + func (dal *DjangoAdminLog) Deleted() bool + func (dal *DjangoAdminLog) DjangoContentType(ctx context.Context, db DB) (*DjangoContentType, error) + func (dal *DjangoAdminLog) Exists() bool + func (dal *DjangoAdminLog) Insert(ctx context.Context, db DB) error + func (dal *DjangoAdminLog) Save(ctx context.Context, db DB) error + func (dal *DjangoAdminLog) Update(ctx context.Context, db DB) error + func (dal *DjangoAdminLog) Upsert(ctx context.Context, db DB) error + type DjangoContentType struct + AppLabel string + ID int + Model string + func DjangoContentTypeByAppLabelModel(ctx context.Context, db DB, appLabel, model string) (*DjangoContentType, error) + func DjangoContentTypeByID(ctx context.Context, db DB, id int) (*DjangoContentType, error) + func (dct *DjangoContentType) Delete(ctx context.Context, db DB) error + func (dct *DjangoContentType) Deleted() bool + func (dct *DjangoContentType) Exists() bool + func (dct *DjangoContentType) Insert(ctx context.Context, db DB) error + func (dct *DjangoContentType) Save(ctx context.Context, db DB) error + func (dct *DjangoContentType) Update(ctx context.Context, db DB) error + func (dct *DjangoContentType) Upsert(ctx context.Context, db DB) error + type DjangoMigration struct + App string + Applied time.Time + ID int64 + Name string + func DjangoMigrationByID(ctx context.Context, db DB, id int64) (*DjangoMigration, error) + func (dm *DjangoMigration) Delete(ctx context.Context, db DB) error + func (dm *DjangoMigration) Deleted() bool + func (dm *DjangoMigration) Exists() bool + func (dm *DjangoMigration) Insert(ctx context.Context, db DB) error + func (dm *DjangoMigration) Save(ctx context.Context, db DB) error + func (dm *DjangoMigration) Update(ctx context.Context, db DB) error + func (dm *DjangoMigration) Upsert(ctx context.Context, db DB) error + type DjangoSession struct + ExpireDate time.Time + SessionData string + SessionKey string + func DjangoSessionByExpireDate(ctx context.Context, db DB, expireDate time.Time) ([]*DjangoSession, error) + func DjangoSessionBySessionKey(ctx context.Context, db DB, sessionKey string) (*DjangoSession, error) + func (ds *DjangoSession) Delete(ctx context.Context, db DB) error + func (ds *DjangoSession) Deleted() bool + func (ds *DjangoSession) Exists() bool + func (ds *DjangoSession) Insert(ctx context.Context, db DB) error + func (ds *DjangoSession) Save(ctx context.Context, db DB) error + func (ds *DjangoSession) Update(ctx context.Context, db DB) error + func (ds *DjangoSession) Upsert(ctx context.Context, db DB) error + type ErrInsertFailed struct + Err error + func (err *ErrInsertFailed) Error() string + func (err *ErrInsertFailed) Unwrap() error + type ErrUpdateFailed struct + Err error + func (err *ErrUpdateFailed) Error() string + func (err *ErrUpdateFailed) Unwrap() error + type ErrUpsertFailed struct + Err error + func (err *ErrUpsertFailed) Error() string + func (err *ErrUpsertFailed) Unwrap() error + type Error string + const ErrAlreadyExists + const ErrDoesNotExist + const ErrMarkedForDeletion + func (err Error) Error() string + type Tag struct + Tag string + TagID int64 + func TagByTagID(ctx context.Context, db DB, tagID int64) (*Tag, error) + func (t *Tag) Delete(ctx context.Context, db DB) error + func (t *Tag) Deleted() bool + func (t *Tag) Exists() bool + func (t *Tag) Insert(ctx context.Context, db DB) error + func (t *Tag) Save(ctx context.Context, db DB) error + func (t *Tag) Update(ctx context.Context, db DB) error + func (t *Tag) Upsert(ctx context.Context, db DB) error Other modules containing this package github.com/danicc097/xo github.com/danicc097/xo/v3