Documentation ¶
Index ¶
- Constants
- type EntityIDRepository
- func (r *EntityIDRepository) AutoMigrate() error
- func (r EntityIDRepository) DB() *gorm.DB
- func (r *EntityIDRepository) LastVal(entityTypeSysname string) (id uint, err error)
- func (r *EntityIDRepository) NextVal(entityTypeSysname string) (id uint, err error)
- func (r *EntityIDRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- type EntityType2PropertyRepository
- func (r *EntityType2PropertyRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *EntityType2PropertyRepository) Create(ctx context.Context, entity *entity_type2property.EntityType2Property) error
- func (r *EntityType2PropertyRepository) CreateTx(ctx context.Context, tx *gorm.DB, ...) error
- func (r EntityType2PropertyRepository) DB() *gorm.DB
- func (r *EntityType2PropertyRepository) Delete(ctx context.Context, entity *entity_type2property.EntityType2Property) error
- func (r *EntityType2PropertyRepository) DeleteTx(ctx context.Context, tx *gorm.DB, ...) error
- func (r *EntityType2PropertyRepository) First(ctx context.Context, entity *entity_type2property.EntityType2Property) (*entity_type2property.EntityType2Property, error)
- func (r *EntityType2PropertyRepository) Get(ctx context.Context, id uint) (*entity_type2property.EntityType2Property, error)
- func (r *EntityType2PropertyRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type2property.EntityType2Property, error)
- func (r *EntityType2PropertyRepository) QueryTx(ctx context.Context, tx *gorm.DB, cond *selection_condition.SelectionCondition) ([]entity_type2property.EntityType2Property, error)
- func (r *EntityType2PropertyRepository) QueryWithEntityType(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type2property.EntityType2Property, error)
- func (r *EntityType2PropertyRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- type EntityTypeRepository
- func (r *EntityTypeRepository) BindProperty(ctx context.Context, id uint, propertyID uint) error
- func (r *EntityTypeRepository) BindPropertyIfNotBinded(ctx context.Context, id uint, propertyID uint) error
- func (r *EntityTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *EntityTypeRepository) Create(ctx context.Context, entity *entity_type.EntityType) error
- func (r EntityTypeRepository) DB() *gorm.DB
- func (r *EntityTypeRepository) Delete(ctx context.Context, entity *entity_type.EntityType) error
- func (r *EntityTypeRepository) First(ctx context.Context, entity *entity_type.EntityType) (*entity_type.EntityType, error)
- func (r *EntityTypeRepository) Get(ctx context.Context, id uint) (*entity_type.EntityType, error)
- func (r *EntityTypeRepository) GetBySysname(ctx context.Context, sysname string, langID uint) (*entity_type.EntityType, error)
- func (r *EntityTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type.EntityType, error)
- func (r *EntityTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *EntityTypeRepository) TCreate(ctx context.Context, entity *entity_type.EntityType, langID uint) (err error)
- func (r *EntityTypeRepository) TFirst(ctx context.Context, entity *entity_type.EntityType, langID uint) (*entity_type.EntityType, error)
- func (r *EntityTypeRepository) TGet(ctx context.Context, id uint, langID uint) (*entity_type.EntityType, error)
- func (r *EntityTypeRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]entity_type.EntityType, error)
- func (r *EntityTypeRepository) TUpdate(ctx context.Context, entity *entity_type.EntityType, langID uint) (err error)
- func (r *EntityTypeRepository) UnbindAllProperties(ctx context.Context, id uint) error
- func (r *EntityTypeRepository) UnbindProperty(ctx context.Context, id uint, propertyID uint) error
- func (r *EntityTypeRepository) Update(ctx context.Context, entity *entity_type.EntityType) error
- type IRepository
- type PropertyGroupRepository
- func (r *PropertyGroupRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *PropertyGroupRepository) Create(ctx context.Context, entity *property_group.PropertyGroup) error
- func (r PropertyGroupRepository) DB() *gorm.DB
- func (r *PropertyGroupRepository) Delete(ctx context.Context, entity *property_group.PropertyGroup) error
- func (r *PropertyGroupRepository) First(ctx context.Context, entity *property_group.PropertyGroup) (*property_group.PropertyGroup, error)
- func (r *PropertyGroupRepository) Get(ctx context.Context, id uint) (*property_group.PropertyGroup, error)
- func (r *PropertyGroupRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_group.PropertyGroup, error)
- func (r *PropertyGroupRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *PropertyGroupRepository) TCreate(ctx context.Context, entity *property_group.PropertyGroup, langID uint) (err error)
- func (r *PropertyGroupRepository) TFirst(ctx context.Context, entity *property_group.PropertyGroup, langID uint) (*property_group.PropertyGroup, error)
- func (r *PropertyGroupRepository) TGet(ctx context.Context, id uint, langID uint) (*property_group.PropertyGroup, error)
- func (r *PropertyGroupRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_group.PropertyGroup, error)
- func (r *PropertyGroupRepository) TUpdate(ctx context.Context, entity *property_group.PropertyGroup, langID uint) (err error)
- func (r *PropertyGroupRepository) Update(ctx context.Context, entity *property_group.PropertyGroup) error
- type PropertyRepository
- func (r *PropertyRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *PropertyRepository) Create(ctx context.Context, entity *property.Property) error
- func (r PropertyRepository) DB() *gorm.DB
- func (r *PropertyRepository) Delete(ctx context.Context, entity *property.Property) error
- func (r *PropertyRepository) EntityNameAndDescriptionInitTx(ctx context.Context, tx *gorm.DB, entity *property.Property, langID uint) error
- func (r *PropertyRepository) First(ctx context.Context, entity *property.Property) (*property.Property, error)
- func (r *PropertyRepository) Get(ctx context.Context, id uint) (*property.Property, error)
- func (r *PropertyRepository) GetBySysname(ctx context.Context, sysname string, langID uint) (*property.Property, error)
- func (r *PropertyRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property.Property, error)
- func (r *PropertyRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *PropertyRepository) TCreate(ctx context.Context, entity *property.Property, langID uint) (err error)
- func (r *PropertyRepository) TFirst(ctx context.Context, entity *property.Property, langID uint) (*property.Property, error)
- func (r *PropertyRepository) TGet(ctx context.Context, id uint, langID uint) (*property.Property, error)
- func (r *PropertyRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property.Property, error)
- func (r *PropertyRepository) TUpdate(ctx context.Context, entity *property.Property, langID uint) (err error)
- func (r *PropertyRepository) Update(ctx context.Context, entity *property.Property) error
- type PropertyType2PropertyViewTypeRepository
- func (r *PropertyType2PropertyViewTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *PropertyType2PropertyViewTypeRepository) Create(ctx context.Context, ...) error
- func (r PropertyType2PropertyViewTypeRepository) DB() *gorm.DB
- func (r *PropertyType2PropertyViewTypeRepository) Delete(ctx context.Context, ...) error
- func (r *PropertyType2PropertyViewTypeRepository) First(ctx context.Context, ...) (*property_type2property_view_type.PropertyType2PropertyViewType, error)
- func (r *PropertyType2PropertyViewTypeRepository) Get(ctx context.Context, id uint) (*property_type2property_view_type.PropertyType2PropertyViewType, error)
- func (r *PropertyType2PropertyViewTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_type2property_view_type.PropertyType2PropertyViewType, error)
- func (r *PropertyType2PropertyViewTypeRepository) Save(ctx context.Context, ...) error
- func (r *PropertyType2PropertyViewTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *PropertyType2PropertyViewTypeRepository) Update(ctx context.Context, ...) error
- type PropertyTypeRepository
- func (r *PropertyTypeRepository) BindPropertyViewType(ctx context.Context, entity *property_type.PropertyType, viewTypeID uint) error
- func (r *PropertyTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *PropertyTypeRepository) Create(ctx context.Context, entity *property_type.PropertyType) error
- func (r PropertyTypeRepository) DB() *gorm.DB
- func (r *PropertyTypeRepository) Delete(ctx context.Context, entity *property_type.PropertyType) error
- func (r *PropertyTypeRepository) First(ctx context.Context, entity *property_type.PropertyType) (*property_type.PropertyType, error)
- func (r *PropertyTypeRepository) Get(ctx context.Context, id uint) (*property_type.PropertyType, error)
- func (r *PropertyTypeRepository) InitPropertyViewTypes(ctx context.Context, entity *property_type.PropertyType) error
- func (r *PropertyTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_type.PropertyType, error)
- func (r *PropertyTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *PropertyTypeRepository) TCreate(ctx context.Context, entity *property_type.PropertyType, langID uint) (err error)
- func (r *PropertyTypeRepository) TFirst(ctx context.Context, entity *property_type.PropertyType, langID uint) (*property_type.PropertyType, error)
- func (r *PropertyTypeRepository) TGet(ctx context.Context, id uint, langID uint) (*property_type.PropertyType, error)
- func (r *PropertyTypeRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_type.PropertyType, error)
- func (r *PropertyTypeRepository) TUpdate(ctx context.Context, entity *property_type.PropertyType, langID uint) (err error)
- func (r *PropertyTypeRepository) UnbindPropertyViewType(ctx context.Context, entity *property_type.PropertyType, viewTypeID uint) error
- func (r *PropertyTypeRepository) Update(ctx context.Context, entity *property_type.PropertyType) error
- type PropertyUnitRepository
- func (r *PropertyUnitRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *PropertyUnitRepository) Create(ctx context.Context, entity *property_unit.PropertyUnit) error
- func (r PropertyUnitRepository) DB() *gorm.DB
- func (r *PropertyUnitRepository) Delete(ctx context.Context, entity *property_unit.PropertyUnit) error
- func (r *PropertyUnitRepository) First(ctx context.Context, entity *property_unit.PropertyUnit) (*property_unit.PropertyUnit, error)
- func (r *PropertyUnitRepository) Get(ctx context.Context, id uint) (*property_unit.PropertyUnit, error)
- func (r *PropertyUnitRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_unit.PropertyUnit, error)
- func (r *PropertyUnitRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *PropertyUnitRepository) TCreate(ctx context.Context, entity *property_unit.PropertyUnit, langID uint) (err error)
- func (r *PropertyUnitRepository) TFirst(ctx context.Context, entity *property_unit.PropertyUnit, langID uint) (*property_unit.PropertyUnit, error)
- func (r *PropertyUnitRepository) TGet(ctx context.Context, id uint, langID uint) (*property_unit.PropertyUnit, error)
- func (r *PropertyUnitRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_unit.PropertyUnit, error)
- func (r *PropertyUnitRepository) TUpdate(ctx context.Context, entity *property_unit.PropertyUnit, langID uint) (err error)
- func (r *PropertyUnitRepository) Update(ctx context.Context, entity *property_unit.PropertyUnit) error
- type PropertyViewTypeRepository
- func (r *PropertyViewTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *PropertyViewTypeRepository) Create(ctx context.Context, entity *property_view_type.PropertyViewType) error
- func (r PropertyViewTypeRepository) DB() *gorm.DB
- func (r *PropertyViewTypeRepository) Delete(ctx context.Context, entity *property_view_type.PropertyViewType) error
- func (r *PropertyViewTypeRepository) First(ctx context.Context, entity *property_view_type.PropertyViewType) (*property_view_type.PropertyViewType, error)
- func (r *PropertyViewTypeRepository) Get(ctx context.Context, id uint) (*property_view_type.PropertyViewType, error)
- func (r *PropertyViewTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_view_type.PropertyViewType, error)
- func (r *PropertyViewTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *PropertyViewTypeRepository) TCreate(ctx context.Context, entity *property_view_type.PropertyViewType, langID uint) (err error)
- func (r *PropertyViewTypeRepository) TFirst(ctx context.Context, entity *property_view_type.PropertyViewType, langID uint) (*property_view_type.PropertyViewType, error)
- func (r *PropertyViewTypeRepository) TGet(ctx context.Context, id uint, langID uint) (*property_view_type.PropertyViewType, error)
- func (r *PropertyViewTypeRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_view_type.PropertyViewType, error)
- func (r *PropertyViewTypeRepository) TUpdate(ctx context.Context, entity *property_view_type.PropertyViewType, langID uint) (err error)
- func (r *PropertyViewTypeRepository) Update(ctx context.Context, entity *property_view_type.PropertyViewType) error
- type RelationRepository
- func (r *RelationRepository) AfterFind(ctx context.Context, entity *entity_type.Relation) error
- func (r *RelationRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *RelationRepository) Create(ctx context.Context, entity *entity_type.Relation) error
- func (r RelationRepository) DB() *gorm.DB
- func (r *RelationRepository) Delete(ctx context.Context, entity *entity_type.Relation) error
- func (r *RelationRepository) First(ctx context.Context, entity *entity_type.Relation) (*entity_type.Relation, error)
- func (r *RelationRepository) Get(ctx context.Context, id uint) (*entity_type.Relation, error)
- func (r *RelationRepository) GetPropertiesAndRelationsByEntityTypeID(ctx context.Context, entityTypeID uint) ([]property.Property, []entity_type.Relation, error)
- func (r *RelationRepository) InitRelatedEntityTypes(ctx context.Context, entity *entity_type.Relation) error
- func (r *RelationRepository) PropertyAndRelationQuery(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property.Property, []entity_type.Relation, error)
- func (r *RelationRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type.Relation, error)
- func (r *RelationRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *RelationRepository) TCreate(ctx context.Context, entity *entity_type.Relation, langID uint) (err error)
- func (r *RelationRepository) TFirst(ctx context.Context, entity *entity_type.Relation, langID uint) (*entity_type.Relation, error)
- func (r *RelationRepository) TGet(ctx context.Context, id uint, langID uint) (*entity_type.Relation, error)
- func (r *RelationRepository) TGetPropertiesAndRelationsByEntityTypeID(ctx context.Context, entityTypeID uint, langID uint) ([]property.Property, []entity_type.Relation, error)
- func (r *RelationRepository) TPropertyAndRelationQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property.Property, []entity_type.Relation, error)
- func (r *RelationRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]entity_type.Relation, error)
- func (r *RelationRepository) TUpdate(ctx context.Context, entity *entity_type.Relation, langID uint) (err error)
- func (r *RelationRepository) Update(ctx context.Context, entity *entity_type.Relation) error
- type TextLangRepository
- func (r *TextLangRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *TextLangRepository) Create(ctx context.Context, entity *text_lang.TextLang) error
- func (r TextLangRepository) DB() *gorm.DB
- func (r *TextLangRepository) Delete(ctx context.Context, id uint) error
- func (r *TextLangRepository) First(ctx context.Context, entity *text_lang.TextLang) (*text_lang.TextLang, error)
- func (r *TextLangRepository) Get(ctx context.Context, id uint) (*text_lang.TextLang, error)
- func (r *TextLangRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]text_lang.TextLang, error)
- func (r *TextLangRepository) Save(ctx context.Context, entity *text_lang.TextLang) error
- func (r *TextLangRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *TextLangRepository) Update(ctx context.Context, entity *text_lang.TextLang) error
- func (r *TextLangRepository) Upsert(ctx context.Context, entity *text_lang.TextLang) error
- type TextSourceRepository
- func (r *TextSourceRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *TextSourceRepository) Create(ctx context.Context, entity *text_source.TextSource) error
- func (r *TextSourceRepository) CreateValueTx(ctx context.Context, tx *gorm.DB, value *string, langID uint) (sourceID *uint, err error)
- func (r TextSourceRepository) DB() *gorm.DB
- func (r *TextSourceRepository) Delete(ctx context.Context, id uint) error
- func (r *TextSourceRepository) DeleteTx(ctx context.Context, tx *gorm.DB, id uint) (err error)
- func (r *TextSourceRepository) First(ctx context.Context, entity *text_source.TextSource) (*text_source.TextSource, error)
- func (r *TextSourceRepository) Get(ctx context.Context, id uint) (*text_source.TextSource, error)
- func (r *TextSourceRepository) GetValuesTx(ctx context.Context, tx *gorm.DB, langID uint, sourceIDs ...*uint) ([]*string, error)
- func (r *TextSourceRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]text_source.TextSource, error)
- func (r *TextSourceRepository) Save(ctx context.Context, entity *text_source.TextSource) error
- func (r *TextSourceRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *TextSourceRepository) TGet(ctx context.Context, id uint, langID uint) (*text_source.TextSource, error)
- func (r *TextSourceRepository) Update(ctx context.Context, entity *text_source.TextSource) error
- func (r *TextSourceRepository) UpdateValueTx(ctx context.Context, tx *gorm.DB, sourceID *uint, value *string, langID uint) (resSourceID *uint, err error)
- type TextValueRepository
- func (r *TextValueRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
- func (r *TextValueRepository) Create(ctx context.Context, entity *text_value.TextValue) error
- func (r *TextValueRepository) CreateTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) error
- func (r TextValueRepository) DB() *gorm.DB
- func (r *TextValueRepository) Delete(ctx context.Context, entity *text_value.TextValue) error
- func (r *TextValueRepository) DeleteTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) error
- func (r *TextValueRepository) First(ctx context.Context, entity *text_value.TextValue) (*text_value.TextValue, error)
- func (r *TextValueRepository) FirstTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) (*text_value.TextValue, error)
- func (r *TextValueRepository) Get(ctx context.Context, id uint) (*text_value.TextValue, error)
- func (r *TextValueRepository) GetValuesTx(ctx context.Context, tx *gorm.DB, langID uint, sourceIDs ...*uint) ([]*string, error)
- func (r *TextValueRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]text_value.TextValue, error)
- func (r *TextValueRepository) QueryTx(ctx context.Context, tx *gorm.DB, cond *selection_condition.SelectionCondition) ([]text_value.TextValue, error)
- func (r *TextValueRepository) Save(ctx context.Context, entity *text_value.TextValue) error
- func (r *TextValueRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
- func (r *TextValueRepository) Update(ctx context.Context, entity *text_value.TextValue) error
- func (r *TextValueRepository) UpdateTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) error
Constants ¶
const DefaultLimit = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityIDRepository ¶
type EntityIDRepository struct {
// contains filtered or unexported fields
}
func GetEntityIDRepository ¶
func GetEntityIDRepository(logger log.Logger, db minipkg_gorm.IDB, entityTypesByClusterSysnames map[string][]string) *EntityIDRepository
func NewEntityIDRepository ¶
func NewEntityIDRepository(repository *repository, entityTypesByClusterSysnames map[string][]string) *EntityIDRepository
func (*EntityIDRepository) AutoMigrate ¶
func (r *EntityIDRepository) AutoMigrate() error
func (*EntityIDRepository) LastVal ¶
func (r *EntityIDRepository) LastVal(entityTypeSysname string) (id uint, err error)
func (*EntityIDRepository) NextVal ¶
func (r *EntityIDRepository) NextVal(entityTypeSysname string) (id uint, err error)
func (*EntityIDRepository) SetDefaultConditions ¶
func (r *EntityIDRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
type EntityType2PropertyRepository ¶
type EntityType2PropertyRepository struct {
// contains filtered or unexported fields
}
EntityType2PropertyRepository is a repository for the EntityType2Property entity
func NewEntityType2PropertyRepository ¶
func NewEntityType2PropertyRepository(repository *repository) (*EntityType2PropertyRepository, error)
New creates a new EntityType2PropertyRepository
func (*EntityType2PropertyRepository) Count ¶
func (r *EntityType2PropertyRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*EntityType2PropertyRepository) Create ¶
func (r *EntityType2PropertyRepository) Create(ctx context.Context, entity *entity_type2property.EntityType2Property) error
Create saves a new record in the database.
func (*EntityType2PropertyRepository) CreateTx ¶
func (r *EntityType2PropertyRepository) CreateTx(ctx context.Context, tx *gorm.DB, entity *entity_type2property.EntityType2Property) error
func (*EntityType2PropertyRepository) Delete ¶
func (r *EntityType2PropertyRepository) Delete(ctx context.Context, entity *entity_type2property.EntityType2Property) error
Delete (soft) deletes a Maintenance record in the database.
func (*EntityType2PropertyRepository) DeleteTx ¶
func (r *EntityType2PropertyRepository) DeleteTx(ctx context.Context, tx *gorm.DB, entity *entity_type2property.EntityType2Property) error
func (*EntityType2PropertyRepository) First ¶
func (r *EntityType2PropertyRepository) First(ctx context.Context, entity *entity_type2property.EntityType2Property) (*entity_type2property.EntityType2Property, error)
func (*EntityType2PropertyRepository) Get ¶
func (r *EntityType2PropertyRepository) Get(ctx context.Context, id uint) (*entity_type2property.EntityType2Property, error)
Get reads the album with the specified ID from the database.
func (*EntityType2PropertyRepository) Query ¶
func (r *EntityType2PropertyRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type2property.EntityType2Property, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*EntityType2PropertyRepository) QueryTx ¶
func (r *EntityType2PropertyRepository) QueryTx(ctx context.Context, tx *gorm.DB, cond *selection_condition.SelectionCondition) ([]entity_type2property.EntityType2Property, error)
func (*EntityType2PropertyRepository) QueryWithEntityType ¶
func (r *EntityType2PropertyRepository) QueryWithEntityType(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type2property.EntityType2Property, error)
func (*EntityType2PropertyRepository) SetDefaultConditions ¶
func (r *EntityType2PropertyRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
type EntityTypeRepository ¶
type EntityTypeRepository struct {
// contains filtered or unexported fields
}
EntityTypeRepository is a repository for the model entity
func NewEntityTypeRepository ¶
func NewEntityTypeRepository(repository *repository, entityType2PropertyRepository *entity_type2property.Repository, textSourceRepository text_source.Repository) (*EntityTypeRepository, error)
New creates a new EntityTypeRepository
func (*EntityTypeRepository) BindProperty ¶
func (*EntityTypeRepository) BindPropertyIfNotBinded ¶
func (*EntityTypeRepository) Count ¶
func (r *EntityTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*EntityTypeRepository) Create ¶
func (r *EntityTypeRepository) Create(ctx context.Context, entity *entity_type.EntityType) error
Create saves a new record in the database.
func (*EntityTypeRepository) Delete ¶
func (r *EntityTypeRepository) Delete(ctx context.Context, entity *entity_type.EntityType) error
Delete (soft) deletes a Maintenance record in the database.
func (*EntityTypeRepository) First ¶
func (r *EntityTypeRepository) First(ctx context.Context, entity *entity_type.EntityType) (*entity_type.EntityType, error)
func (*EntityTypeRepository) Get ¶
func (r *EntityTypeRepository) Get(ctx context.Context, id uint) (*entity_type.EntityType, error)
Get reads the album with the specified ID from the database.
func (*EntityTypeRepository) GetBySysname ¶
func (r *EntityTypeRepository) GetBySysname(ctx context.Context, sysname string, langID uint) (*entity_type.EntityType, error)
func (*EntityTypeRepository) Query ¶
func (r *EntityTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type.EntityType, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*EntityTypeRepository) SetDefaultConditions ¶
func (r *EntityTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*EntityTypeRepository) TCreate ¶
func (r *EntityTypeRepository) TCreate(ctx context.Context, entity *entity_type.EntityType, langID uint) (err error)
func (*EntityTypeRepository) TFirst ¶
func (r *EntityTypeRepository) TFirst(ctx context.Context, entity *entity_type.EntityType, langID uint) (*entity_type.EntityType, error)
func (*EntityTypeRepository) TGet ¶
func (r *EntityTypeRepository) TGet(ctx context.Context, id uint, langID uint) (*entity_type.EntityType, error)
func (*EntityTypeRepository) TQuery ¶
func (r *EntityTypeRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]entity_type.EntityType, error)
func (*EntityTypeRepository) TUpdate ¶
func (r *EntityTypeRepository) TUpdate(ctx context.Context, entity *entity_type.EntityType, langID uint) (err error)
func (*EntityTypeRepository) UnbindAllProperties ¶
func (r *EntityTypeRepository) UnbindAllProperties(ctx context.Context, id uint) error
func (*EntityTypeRepository) UnbindProperty ¶
func (*EntityTypeRepository) Update ¶
func (r *EntityTypeRepository) Update(ctx context.Context, entity *entity_type.EntityType) error
Update saves a changed Maintenance record in the database.
type IRepository ¶
IRepository is an interface of repository
func GetRepository ¶
func GetRepository(logger log.Logger, dbase minipkg_gorm.IDB, entityName string) (repo IRepository, err error)
GetRepository return a repository
type PropertyGroupRepository ¶
type PropertyGroupRepository struct {
// contains filtered or unexported fields
}
PropertyGroupRepository is a repository for the model entity
func NewPropertyGroupRepository ¶
func NewPropertyGroupRepository(repository *repository, textSourceRepository text_source.Repository) (*PropertyGroupRepository, error)
New creates a new PropertyGroupRepository
func (*PropertyGroupRepository) Count ¶
func (r *PropertyGroupRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*PropertyGroupRepository) Create ¶
func (r *PropertyGroupRepository) Create(ctx context.Context, entity *property_group.PropertyGroup) error
Create saves a new record in the database.
func (*PropertyGroupRepository) Delete ¶
func (r *PropertyGroupRepository) Delete(ctx context.Context, entity *property_group.PropertyGroup) error
Delete (soft) deletes a Maintenance record in the database.
func (*PropertyGroupRepository) First ¶
func (r *PropertyGroupRepository) First(ctx context.Context, entity *property_group.PropertyGroup) (*property_group.PropertyGroup, error)
func (*PropertyGroupRepository) Get ¶
func (r *PropertyGroupRepository) Get(ctx context.Context, id uint) (*property_group.PropertyGroup, error)
Get reads the album with the specified ID from the database.
func (*PropertyGroupRepository) Query ¶
func (r *PropertyGroupRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_group.PropertyGroup, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*PropertyGroupRepository) SetDefaultConditions ¶
func (r *PropertyGroupRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*PropertyGroupRepository) TCreate ¶
func (r *PropertyGroupRepository) TCreate(ctx context.Context, entity *property_group.PropertyGroup, langID uint) (err error)
func (*PropertyGroupRepository) TFirst ¶
func (r *PropertyGroupRepository) TFirst(ctx context.Context, entity *property_group.PropertyGroup, langID uint) (*property_group.PropertyGroup, error)
func (*PropertyGroupRepository) TGet ¶
func (r *PropertyGroupRepository) TGet(ctx context.Context, id uint, langID uint) (*property_group.PropertyGroup, error)
func (*PropertyGroupRepository) TQuery ¶
func (r *PropertyGroupRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_group.PropertyGroup, error)
func (*PropertyGroupRepository) TUpdate ¶
func (r *PropertyGroupRepository) TUpdate(ctx context.Context, entity *property_group.PropertyGroup, langID uint) (err error)
func (*PropertyGroupRepository) Update ¶
func (r *PropertyGroupRepository) Update(ctx context.Context, entity *property_group.PropertyGroup) error
Update saves a changed Maintenance record in the database.
type PropertyRepository ¶
type PropertyRepository struct {
// contains filtered or unexported fields
}
PropertyRepository is a repository for the model entity
func NewPropertyRepository ¶
func NewPropertyRepository(repository *repository, textSourceRepository text_source.Repository) (*PropertyRepository, error)
New creates a new PropertyRepository
func (*PropertyRepository) Count ¶
func (r *PropertyRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*PropertyRepository) EntityNameAndDescriptionInitTx ¶
func (*PropertyRepository) GetBySysname ¶
func (*PropertyRepository) Query ¶
func (r *PropertyRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property.Property, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*PropertyRepository) SetDefaultConditions ¶
func (r *PropertyRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*PropertyRepository) TQuery ¶
func (r *PropertyRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property.Property, error)
type PropertyType2PropertyViewTypeRepository ¶
type PropertyType2PropertyViewTypeRepository struct {
// contains filtered or unexported fields
}
PropertyType2PropertyViewTypeRepository is a repository for the model entity
func NewPropertyType2PropertyViewTypeRepository ¶
func NewPropertyType2PropertyViewTypeRepository(repository *repository) (*PropertyType2PropertyViewTypeRepository, error)
New creates a new PropertyType2PropertyViewTypeRepository
func (*PropertyType2PropertyViewTypeRepository) Count ¶
func (r *PropertyType2PropertyViewTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*PropertyType2PropertyViewTypeRepository) Create ¶
func (r *PropertyType2PropertyViewTypeRepository) Create(ctx context.Context, entity *property_type2property_view_type.PropertyType2PropertyViewType) error
Create saves a new record in the database.
func (*PropertyType2PropertyViewTypeRepository) Delete ¶
func (r *PropertyType2PropertyViewTypeRepository) Delete(ctx context.Context, entity *property_type2property_view_type.PropertyType2PropertyViewType) error
Delete (soft) deletes a Maintenance record in the database.
func (*PropertyType2PropertyViewTypeRepository) Get ¶
func (r *PropertyType2PropertyViewTypeRepository) Get(ctx context.Context, id uint) (*property_type2property_view_type.PropertyType2PropertyViewType, error)
Get reads the album with the specified ID from the database.
func (*PropertyType2PropertyViewTypeRepository) Query ¶
func (r *PropertyType2PropertyViewTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_type2property_view_type.PropertyType2PropertyViewType, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*PropertyType2PropertyViewTypeRepository) Save ¶
func (r *PropertyType2PropertyViewTypeRepository) Save(ctx context.Context, entity *property_type2property_view_type.PropertyType2PropertyViewType) error
Save update value in database, if the value doesn't have primary key, will insert it
func (*PropertyType2PropertyViewTypeRepository) SetDefaultConditions ¶
func (r *PropertyType2PropertyViewTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*PropertyType2PropertyViewTypeRepository) Update ¶
func (r *PropertyType2PropertyViewTypeRepository) Update(ctx context.Context, entity *property_type2property_view_type.PropertyType2PropertyViewType) error
Update saves a changed Maintenance record in the database.
type PropertyTypeRepository ¶
type PropertyTypeRepository struct {
// contains filtered or unexported fields
}
PropertyTypeRepository is a repository for the model entity
func NewPropertyTypeRepository ¶
func NewPropertyTypeRepository(repository *repository, textSourceRepository text_source.Repository) (*PropertyTypeRepository, error)
New creates a new PropertyTypeRepository
func (*PropertyTypeRepository) BindPropertyViewType ¶
func (r *PropertyTypeRepository) BindPropertyViewType(ctx context.Context, entity *property_type.PropertyType, viewTypeID uint) error
func (*PropertyTypeRepository) Count ¶
func (r *PropertyTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*PropertyTypeRepository) Create ¶
func (r *PropertyTypeRepository) Create(ctx context.Context, entity *property_type.PropertyType) error
Create saves a new record in the database.
func (*PropertyTypeRepository) Delete ¶
func (r *PropertyTypeRepository) Delete(ctx context.Context, entity *property_type.PropertyType) error
Delete (soft) deletes a record in the database.
func (*PropertyTypeRepository) First ¶
func (r *PropertyTypeRepository) First(ctx context.Context, entity *property_type.PropertyType) (*property_type.PropertyType, error)
func (*PropertyTypeRepository) Get ¶
func (r *PropertyTypeRepository) Get(ctx context.Context, id uint) (*property_type.PropertyType, error)
Get reads the album with the specified ID from the database.
func (*PropertyTypeRepository) InitPropertyViewTypes ¶
func (r *PropertyTypeRepository) InitPropertyViewTypes(ctx context.Context, entity *property_type.PropertyType) error
func (*PropertyTypeRepository) Query ¶
func (r *PropertyTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_type.PropertyType, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*PropertyTypeRepository) SetDefaultConditions ¶
func (r *PropertyTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*PropertyTypeRepository) TCreate ¶
func (r *PropertyTypeRepository) TCreate(ctx context.Context, entity *property_type.PropertyType, langID uint) (err error)
func (*PropertyTypeRepository) TFirst ¶
func (r *PropertyTypeRepository) TFirst(ctx context.Context, entity *property_type.PropertyType, langID uint) (*property_type.PropertyType, error)
func (*PropertyTypeRepository) TGet ¶
func (r *PropertyTypeRepository) TGet(ctx context.Context, id uint, langID uint) (*property_type.PropertyType, error)
func (*PropertyTypeRepository) TQuery ¶
func (r *PropertyTypeRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_type.PropertyType, error)
func (*PropertyTypeRepository) TUpdate ¶
func (r *PropertyTypeRepository) TUpdate(ctx context.Context, entity *property_type.PropertyType, langID uint) (err error)
func (*PropertyTypeRepository) UnbindPropertyViewType ¶
func (r *PropertyTypeRepository) UnbindPropertyViewType(ctx context.Context, entity *property_type.PropertyType, viewTypeID uint) error
func (*PropertyTypeRepository) Update ¶
func (r *PropertyTypeRepository) Update(ctx context.Context, entity *property_type.PropertyType) error
Update saves a changed record in the database.
type PropertyUnitRepository ¶
type PropertyUnitRepository struct {
// contains filtered or unexported fields
}
PropertyUnitRepository is a repository for the model entity
func NewPropertyUnitRepository ¶
func NewPropertyUnitRepository(repository *repository, textSourceRepository text_source.Repository) (*PropertyUnitRepository, error)
New creates a new PropertyUnitRepository
func (*PropertyUnitRepository) Count ¶
func (r *PropertyUnitRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*PropertyUnitRepository) Create ¶
func (r *PropertyUnitRepository) Create(ctx context.Context, entity *property_unit.PropertyUnit) error
Create saves a new record in the database.
func (*PropertyUnitRepository) Delete ¶
func (r *PropertyUnitRepository) Delete(ctx context.Context, entity *property_unit.PropertyUnit) error
Delete (soft) deletes a Maintenance record in the database.
func (*PropertyUnitRepository) First ¶
func (r *PropertyUnitRepository) First(ctx context.Context, entity *property_unit.PropertyUnit) (*property_unit.PropertyUnit, error)
func (*PropertyUnitRepository) Get ¶
func (r *PropertyUnitRepository) Get(ctx context.Context, id uint) (*property_unit.PropertyUnit, error)
Get reads the album with the specified ID from the database.
func (*PropertyUnitRepository) Query ¶
func (r *PropertyUnitRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_unit.PropertyUnit, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*PropertyUnitRepository) SetDefaultConditions ¶
func (r *PropertyUnitRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*PropertyUnitRepository) TCreate ¶
func (r *PropertyUnitRepository) TCreate(ctx context.Context, entity *property_unit.PropertyUnit, langID uint) (err error)
func (*PropertyUnitRepository) TFirst ¶
func (r *PropertyUnitRepository) TFirst(ctx context.Context, entity *property_unit.PropertyUnit, langID uint) (*property_unit.PropertyUnit, error)
func (*PropertyUnitRepository) TGet ¶
func (r *PropertyUnitRepository) TGet(ctx context.Context, id uint, langID uint) (*property_unit.PropertyUnit, error)
func (*PropertyUnitRepository) TQuery ¶
func (r *PropertyUnitRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_unit.PropertyUnit, error)
func (*PropertyUnitRepository) TUpdate ¶
func (r *PropertyUnitRepository) TUpdate(ctx context.Context, entity *property_unit.PropertyUnit, langID uint) (err error)
func (*PropertyUnitRepository) Update ¶
func (r *PropertyUnitRepository) Update(ctx context.Context, entity *property_unit.PropertyUnit) error
Update saves a changed Maintenance record in the database.
type PropertyViewTypeRepository ¶
type PropertyViewTypeRepository struct {
// contains filtered or unexported fields
}
PropertyViewTypeRepository is a repository for the model entity
func NewPropertyViewTypeRepository ¶
func NewPropertyViewTypeRepository(repository *repository, textSourceRepository text_source.Repository) (*PropertyViewTypeRepository, error)
New creates a new PropertyViewTypeRepository
func (*PropertyViewTypeRepository) Count ¶
func (r *PropertyViewTypeRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*PropertyViewTypeRepository) Create ¶
func (r *PropertyViewTypeRepository) Create(ctx context.Context, entity *property_view_type.PropertyViewType) error
Create saves a new record in the database.
func (*PropertyViewTypeRepository) Delete ¶
func (r *PropertyViewTypeRepository) Delete(ctx context.Context, entity *property_view_type.PropertyViewType) error
Delete (soft) deletes a Maintenance record in the database.
func (*PropertyViewTypeRepository) First ¶
func (r *PropertyViewTypeRepository) First(ctx context.Context, entity *property_view_type.PropertyViewType) (*property_view_type.PropertyViewType, error)
func (*PropertyViewTypeRepository) Get ¶
func (r *PropertyViewTypeRepository) Get(ctx context.Context, id uint) (*property_view_type.PropertyViewType, error)
Get reads the album with the specified ID from the database.
func (*PropertyViewTypeRepository) Query ¶
func (r *PropertyViewTypeRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property_view_type.PropertyViewType, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*PropertyViewTypeRepository) SetDefaultConditions ¶
func (r *PropertyViewTypeRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*PropertyViewTypeRepository) TCreate ¶
func (r *PropertyViewTypeRepository) TCreate(ctx context.Context, entity *property_view_type.PropertyViewType, langID uint) (err error)
func (*PropertyViewTypeRepository) TFirst ¶
func (r *PropertyViewTypeRepository) TFirst(ctx context.Context, entity *property_view_type.PropertyViewType, langID uint) (*property_view_type.PropertyViewType, error)
func (*PropertyViewTypeRepository) TGet ¶
func (r *PropertyViewTypeRepository) TGet(ctx context.Context, id uint, langID uint) (*property_view_type.PropertyViewType, error)
func (*PropertyViewTypeRepository) TQuery ¶
func (r *PropertyViewTypeRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property_view_type.PropertyViewType, error)
func (*PropertyViewTypeRepository) TUpdate ¶
func (r *PropertyViewTypeRepository) TUpdate(ctx context.Context, entity *property_view_type.PropertyViewType, langID uint) (err error)
func (*PropertyViewTypeRepository) Update ¶
func (r *PropertyViewTypeRepository) Update(ctx context.Context, entity *property_view_type.PropertyViewType) error
Update saves a changed Maintenance record in the database.
type RelationRepository ¶
type RelationRepository struct {
// contains filtered or unexported fields
}
RelationRepository is a repository for the model entity
func NewRelationRepository ¶
func NewRelationRepository(repository *repository, propertyRepository property.Repository, entityType2PropertyRepository entity_type2property.Repository, textSourceRepository text_source.Repository) (*RelationRepository, error)
New creates a new RelationRepository
func (*RelationRepository) AfterFind ¶
func (r *RelationRepository) AfterFind(ctx context.Context, entity *entity_type.Relation) error
func (*RelationRepository) Count ¶
func (r *RelationRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*RelationRepository) Create ¶
func (r *RelationRepository) Create(ctx context.Context, entity *entity_type.Relation) error
Create saves a new record in the database.
func (*RelationRepository) Delete ¶
func (r *RelationRepository) Delete(ctx context.Context, entity *entity_type.Relation) error
Delete (soft) deletes a Maintenance record in the database.
func (*RelationRepository) First ¶
func (r *RelationRepository) First(ctx context.Context, entity *entity_type.Relation) (*entity_type.Relation, error)
func (*RelationRepository) Get ¶
func (r *RelationRepository) Get(ctx context.Context, id uint) (*entity_type.Relation, error)
Get reads the album with the specified ID from the database.
func (*RelationRepository) GetPropertiesAndRelationsByEntityTypeID ¶
func (r *RelationRepository) GetPropertiesAndRelationsByEntityTypeID(ctx context.Context, entityTypeID uint) ([]property.Property, []entity_type.Relation, error)
func (*RelationRepository) InitRelatedEntityTypes ¶
func (r *RelationRepository) InitRelatedEntityTypes(ctx context.Context, entity *entity_type.Relation) error
func (*RelationRepository) PropertyAndRelationQuery ¶
func (r *RelationRepository) PropertyAndRelationQuery(ctx context.Context, cond *selection_condition.SelectionCondition) ([]property.Property, []entity_type.Relation, error)
func (*RelationRepository) Query ¶
func (r *RelationRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]entity_type.Relation, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*RelationRepository) SetDefaultConditions ¶
func (r *RelationRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*RelationRepository) TCreate ¶
func (r *RelationRepository) TCreate(ctx context.Context, entity *entity_type.Relation, langID uint) (err error)
func (*RelationRepository) TFirst ¶
func (r *RelationRepository) TFirst(ctx context.Context, entity *entity_type.Relation, langID uint) (*entity_type.Relation, error)
func (*RelationRepository) TGet ¶
func (r *RelationRepository) TGet(ctx context.Context, id uint, langID uint) (*entity_type.Relation, error)
func (*RelationRepository) TGetPropertiesAndRelationsByEntityTypeID ¶
func (r *RelationRepository) TGetPropertiesAndRelationsByEntityTypeID(ctx context.Context, entityTypeID uint, langID uint) ([]property.Property, []entity_type.Relation, error)
func (*RelationRepository) TPropertyAndRelationQuery ¶
func (r *RelationRepository) TPropertyAndRelationQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]property.Property, []entity_type.Relation, error)
func (*RelationRepository) TQuery ¶
func (r *RelationRepository) TQuery(ctx context.Context, cond *selection_condition.SelectionCondition, langID uint) ([]entity_type.Relation, error)
func (*RelationRepository) TUpdate ¶
func (r *RelationRepository) TUpdate(ctx context.Context, entity *entity_type.Relation, langID uint) (err error)
func (*RelationRepository) Update ¶
func (r *RelationRepository) Update(ctx context.Context, entity *entity_type.Relation) error
Update saves a changed Maintenance record in the database.
type TextLangRepository ¶
type TextLangRepository struct {
// contains filtered or unexported fields
}
TextLangRepository is a repository for the model entity
func NewTextLangRepository ¶
func NewTextLangRepository(repository *repository) (*TextLangRepository, error)
New creates a new TextLangRepository
func (*TextLangRepository) Count ¶
func (r *TextLangRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*TextLangRepository) Delete ¶
func (r *TextLangRepository) Delete(ctx context.Context, id uint) error
Delete (soft) deletes a record in the database.
func (*TextLangRepository) Query ¶
func (r *TextLangRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]text_lang.TextLang, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*TextLangRepository) Save ¶
Save update value in database, if the value doesn't have primary key, will insert it
func (*TextLangRepository) SetDefaultConditions ¶
func (r *TextLangRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
type TextSourceRepository ¶
type TextSourceRepository struct {
// contains filtered or unexported fields
}
TextSourceRepository is a repository for the model entity
func NewTextSourceRepository ¶
func NewTextSourceRepository(repository *repository, textValueRepository text_value.Repository) (*TextSourceRepository, error)
New creates a new TextSourceRepository
func (*TextSourceRepository) Count ¶
func (r *TextSourceRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*TextSourceRepository) Create ¶
func (r *TextSourceRepository) Create(ctx context.Context, entity *text_source.TextSource) error
Create saves a new record in the database.
func (*TextSourceRepository) CreateValueTx ¶
func (*TextSourceRepository) Delete ¶
func (r *TextSourceRepository) Delete(ctx context.Context, id uint) error
Delete (soft) deletes a Maintenance record in the database.
func (*TextSourceRepository) First ¶
func (r *TextSourceRepository) First(ctx context.Context, entity *text_source.TextSource) (*text_source.TextSource, error)
func (*TextSourceRepository) Get ¶
func (r *TextSourceRepository) Get(ctx context.Context, id uint) (*text_source.TextSource, error)
Get reads the album with the specified ID from the database.
func (*TextSourceRepository) GetValuesTx ¶
func (*TextSourceRepository) Query ¶
func (r *TextSourceRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]text_source.TextSource, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*TextSourceRepository) Save ¶
func (r *TextSourceRepository) Save(ctx context.Context, entity *text_source.TextSource) error
Save update value in database, if the value doesn't have primary key, will insert it
func (*TextSourceRepository) SetDefaultConditions ¶
func (r *TextSourceRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*TextSourceRepository) TGet ¶
func (r *TextSourceRepository) TGet(ctx context.Context, id uint, langID uint) (*text_source.TextSource, error)
TGet reads the album with the specified ID from the database.
func (*TextSourceRepository) Update ¶
func (r *TextSourceRepository) Update(ctx context.Context, entity *text_source.TextSource) error
Update saves a changed Maintenance record in the database.
type TextValueRepository ¶
type TextValueRepository struct {
// contains filtered or unexported fields
}
TextValueRepository is a repository for the model entity
func NewTextValueRepository ¶
func NewTextValueRepository(repository *repository) (*TextValueRepository, error)
New creates a new TextValueRepository
func (*TextValueRepository) Count ¶
func (r *TextValueRepository) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error)
func (*TextValueRepository) Create ¶
func (r *TextValueRepository) Create(ctx context.Context, entity *text_value.TextValue) error
Create saves a new record in the database.
func (*TextValueRepository) CreateTx ¶
func (r *TextValueRepository) CreateTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) error
func (*TextValueRepository) Delete ¶
func (r *TextValueRepository) Delete(ctx context.Context, entity *text_value.TextValue) error
Delete (soft) deletes a Maintenance record in the database.
func (*TextValueRepository) DeleteTx ¶
func (r *TextValueRepository) DeleteTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) error
func (*TextValueRepository) First ¶
func (r *TextValueRepository) First(ctx context.Context, entity *text_value.TextValue) (*text_value.TextValue, error)
func (*TextValueRepository) FirstTx ¶
func (r *TextValueRepository) FirstTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) (*text_value.TextValue, error)
func (*TextValueRepository) Get ¶
func (r *TextValueRepository) Get(ctx context.Context, id uint) (*text_value.TextValue, error)
Get reads the album with the specified ID from the database.
func (*TextValueRepository) GetValuesTx ¶
func (*TextValueRepository) Query ¶
func (r *TextValueRepository) Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]text_value.TextValue, error)
Query retrieves the album records with the specified offset and limit from the database.
func (*TextValueRepository) QueryTx ¶
func (r *TextValueRepository) QueryTx(ctx context.Context, tx *gorm.DB, cond *selection_condition.SelectionCondition) ([]text_value.TextValue, error)
func (*TextValueRepository) Save ¶
func (r *TextValueRepository) Save(ctx context.Context, entity *text_value.TextValue) error
Save update value in database, if the value doesn't have primary key, will insert it
func (*TextValueRepository) SetDefaultConditions ¶
func (r *TextValueRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)
func (*TextValueRepository) Update ¶
func (r *TextValueRepository) Update(ctx context.Context, entity *text_value.TextValue) error
Update saves a changed Maintenance record in the database.
func (*TextValueRepository) UpdateTx ¶
func (r *TextValueRepository) UpdateTx(ctx context.Context, tx *gorm.DB, entity *text_value.TextValue) error
Source Files ¶
- entity_id_repository.go
- entity_type2property_repository.go
- entity_type_repository.go
- property_group_repository.go
- property_repository.go
- property_type2property_view_type_repository.go
- property_type_repository.go
- property_unit_repository.go
- property_view_type_repository.go
- relation_repository.go
- repository.go
- text_lang_repository.go
- text_source_repository.go
- text_value_repository.go