persistence

package
v0.0.0-...-1d2c3bc Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(value interface{}) error

Create

func DeleteByID

func DeleteByID(model interface{}, id uint64) (count int64, err error)

Delete

func DeleteByIDS

func DeleteByIDS(model interface{}, ids []uint64) (count int64, err error)

Delete

func DeleteByModel

func DeleteByModel(model interface{}) (count int64, err error)

Delete

func DeleteByWhere

func DeleteByWhere(model, where interface{}) (count int64, err error)

Delete

func Find

func Find(where interface{}, out interface{}, associations []string, orders ...string) error

Find

func First

func First(where interface{}, out interface{}, associations []string) (notFound bool, err error)

First

func FirstByID

func FirstByID(out interface{}, id string) (notFound bool, err error)

First

func Save

func Save(value interface{}) error

Save

func Scan

func Scan(model, where interface{}, out interface{}) (notFound bool, err error)

Scan

func ScanList

func ScanList(model, where interface{}, out interface{}, orders ...string) error

ScanList

func Updates

func Updates(where interface{}, value interface{}) error

Updates

Types

type AuctionRepository

type AuctionRepository struct{}

func GetAuctionRepository

func GetAuctionRepository() *AuctionRepository

func (*AuctionRepository) Add

func (r *AuctionRepository) Add(Auction *models.Auction) error

func (*AuctionRepository) All

func (r *AuctionRepository) All() (*[]models.Auction, error)

func (*AuctionRepository) Delete

func (r *AuctionRepository) Delete(Auction *models.Auction) error

func (*AuctionRepository) Get

func (r *AuctionRepository) Get(id string) (*models.Auction, error)

func (*AuctionRepository) Query

func (r *AuctionRepository) Query(q *models.Auction) (*[]models.Auction, error)

func (*AuctionRepository) Update

func (r *AuctionRepository) Update(Auction *models.Auction) error

type CertificateOfAuthenticityRepository

type CertificateOfAuthenticityRepository struct{}

func GetCertificateOfAuthenticityRepository

func GetCertificateOfAuthenticityRepository() *CertificateOfAuthenticityRepository

func (*CertificateOfAuthenticityRepository) Add

func (*CertificateOfAuthenticityRepository) All

func (*CertificateOfAuthenticityRepository) Delete

func (r *CertificateOfAuthenticityRepository) Delete(CertificateOfAuthenticity *models.CertificateOfAuthenticity) error

func (*CertificateOfAuthenticityRepository) Get

func (*CertificateOfAuthenticityRepository) Query

func (*CertificateOfAuthenticityRepository) Update

func (r *CertificateOfAuthenticityRepository) Update(CertificateOfAuthenticity *models.CertificateOfAuthenticity) error

type CertificateOfOwnershipRepository

type CertificateOfOwnershipRepository struct{}

func GetCertificateOfOwnershipRepository

func GetCertificateOfOwnershipRepository() *CertificateOfOwnershipRepository

func (*CertificateOfOwnershipRepository) Add

func (r *CertificateOfOwnershipRepository) Add(CertificateOfOwnership *models.CertificateOfOwnership) error

func (*CertificateOfOwnershipRepository) All

func (*CertificateOfOwnershipRepository) Delete

func (r *CertificateOfOwnershipRepository) Delete(CertificateOfOwnership *models.CertificateOfOwnership) error

func (*CertificateOfOwnershipRepository) Get

func (*CertificateOfOwnershipRepository) Query

func (*CertificateOfOwnershipRepository) Update

func (r *CertificateOfOwnershipRepository) Update(CertificateOfOwnership *models.CertificateOfOwnership) error

type CopyrightRepository

type CopyrightRepository struct{}

func GetCopyrightRepository

func GetCopyrightRepository() *CopyrightRepository

func (*CopyrightRepository) Add

func (r *CopyrightRepository) Add(Copyright *models.Copyright) error

func (*CopyrightRepository) All

func (r *CopyrightRepository) All() (*[]models.Copyright, error)

func (*CopyrightRepository) Delete

func (r *CopyrightRepository) Delete(Copyright *models.Copyright) error

func (*CopyrightRepository) Get

func (*CopyrightRepository) Query

func (*CopyrightRepository) Update

func (r *CopyrightRepository) Update(Copyright *models.Copyright) error

type EntryRepository

type EntryRepository struct{}

func GetEntryRepository

func GetEntryRepository() *EntryRepository

func (*EntryRepository) Add

func (r *EntryRepository) Add(Entry *models.Entry) error

func (*EntryRepository) All

func (r *EntryRepository) All() (*[]models.Entry, error)

func (*EntryRepository) Delete

func (r *EntryRepository) Delete(Entry *models.Entry) error

func (*EntryRepository) Get

func (r *EntryRepository) Get(id string) (*models.Entry, error)

func (*EntryRepository) GetAuctionEntry

func (r *EntryRepository) GetAuctionEntry(EntryId string) (*[]models.Auction, error)

func (*EntryRepository) GetExhibitionByEntry

func (r *EntryRepository) GetExhibitionByEntry(EntryId string) (*[]models.Exhibition, error)

func (*EntryRepository) GetProvenanceByEntry

func (r *EntryRepository) GetProvenanceByEntry(EntryId string) (*[]models.Provenance, error)

func (*EntryRepository) Query

func (r *EntryRepository) Query(q *models.Entry) (*[]models.Entry, error)

func (*EntryRepository) Update

func (r *EntryRepository) Update(Entry *models.Entry) error

type ExhibitionRepository

type ExhibitionRepository struct{}

func GetExhibitionRepository

func GetExhibitionRepository() *ExhibitionRepository

func (*ExhibitionRepository) Add

func (r *ExhibitionRepository) Add(Exhibition *models.Exhibition) error

func (*ExhibitionRepository) All

func (*ExhibitionRepository) Delete

func (r *ExhibitionRepository) Delete(Exhibition *models.Exhibition) error

func (*ExhibitionRepository) Get

func (*ExhibitionRepository) Query

func (*ExhibitionRepository) Update

func (r *ExhibitionRepository) Update(Exhibition *models.Exhibition) error

type ProfileRepository

type ProfileRepository struct{}

func GetProfileRepository

func GetProfileRepository() *ProfileRepository

func (*ProfileRepository) Add

func (r *ProfileRepository) Add(Profile *models.Profile) error

func (*ProfileRepository) All

func (r *ProfileRepository) All() (*[]models.Profile, error)

func (*ProfileRepository) Delete

func (r *ProfileRepository) Delete(Profile *models.Profile) error

func (*ProfileRepository) Get

func (r *ProfileRepository) Get(id string) (*models.Profile, error)

func (*ProfileRepository) GetByUserId

func (r *ProfileRepository) GetByUserId(userId string) (*models.Profile, error)

func (*ProfileRepository) Query

func (r *ProfileRepository) Query(q *models.Profile) (*[]models.Profile, error)

func (*ProfileRepository) Update

func (r *ProfileRepository) Update(Profile *models.Profile) error

type ProvenanceRepository

type ProvenanceRepository struct{}

func GetProvenanceRepository

func GetProvenanceRepository() *ProvenanceRepository

func (*ProvenanceRepository) Add

func (r *ProvenanceRepository) Add(Provenance *models.Provenance) error

func (*ProvenanceRepository) All

func (*ProvenanceRepository) Delete

func (r *ProvenanceRepository) Delete(Provenance *models.Provenance) error

func (*ProvenanceRepository) Get

func (*ProvenanceRepository) Query

func (*ProvenanceRepository) Update

func (r *ProvenanceRepository) Update(Provenance *models.Provenance) error

type RecordRepository

type RecordRepository struct{}

func GetRecordRepository

func GetRecordRepository() *RecordRepository

func (*RecordRepository) Add

func (r *RecordRepository) Add(Record *models.Record) error

func (*RecordRepository) All

func (r *RecordRepository) All() (*[]models.Record, error)

func (*RecordRepository) Delete

func (r *RecordRepository) Delete(Record *models.Record) error

func (*RecordRepository) Get

func (r *RecordRepository) Get(id string) (*models.Record, error)

func (*RecordRepository) GetAuctionRecord

func (r *RecordRepository) GetAuctionRecord(RecordId string) (*[]models.Auction, error)

func (*RecordRepository) GetExhibitionByRecord

func (r *RecordRepository) GetExhibitionByRecord(RecordId string) (*[]models.Exhibition, error)

func (*RecordRepository) GetProvenanceByRecord

func (r *RecordRepository) GetProvenanceByRecord(RecordId string) (*[]models.Provenance, error)

func (*RecordRepository) Query

func (r *RecordRepository) Query(q *models.Record) (*[]models.Record, error)

func (*RecordRepository) Update

func (r *RecordRepository) Update(Record *models.Record) error

type TaskRepository

type TaskRepository struct{}

func GetTaskRepository

func GetTaskRepository() *TaskRepository

func (*TaskRepository) Add

func (r *TaskRepository) Add(task *models.Task) error

func (*TaskRepository) All

func (r *TaskRepository) All() (*[]models.Task, error)

func (*TaskRepository) Delete

func (r *TaskRepository) Delete(task *models.Task) error

func (*TaskRepository) Get

func (r *TaskRepository) Get(id string) (*models.Task, error)

func (*TaskRepository) Query

func (r *TaskRepository) Query(q *models.Task) (*[]models.Task, error)

func (*TaskRepository) Update

func (r *TaskRepository) Update(task *models.Task) error

type UserRepository

type UserRepository struct{}

func GetUserRepository

func GetUserRepository() *UserRepository

func (*UserRepository) Add

func (r *UserRepository) Add(user *models.User) error

func (*UserRepository) All

func (r *UserRepository) All() (*[]models.User, error)

func (*UserRepository) Delete

func (r *UserRepository) Delete(user *models.User) error

func (*UserRepository) Get

func (r *UserRepository) Get(id string) (*models.User, error)

func (*UserRepository) GetByEmail

func (r *UserRepository) GetByEmail(email string) (*models.User, error)

func (*UserRepository) GetByUUID

func (r *UserRepository) GetByUUID(uuid string) (*models.User, error)

func (*UserRepository) Query

func (r *UserRepository) Query(q *models.User) (*[]models.User, error)

func (*UserRepository) Update

func (r *UserRepository) Update(user *models.User) error

Jump to

Keyboard shortcuts

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