MCPcopy Create free account
hub / github.com/pydio/cells / GetEntityValues

Method GetEntityValues

idm/meta/dao/sql/ev-sql.go:241–254  ·  view source on GitHub ↗

GetEntityValues retrieves all entity values linked to a given entity UUID

(ctx context.Context, entityUuid string)

Source from the content-addressed store, hash-verified

239
240// GetEntityValues retrieves all entity values linked to a given entity UUID
241func (s *evSqlImpl) GetEntityValues(ctx context.Context, entityUuid string) ([]*idm.EntityValue, error) {
242 var models []*EntityValues
243 tx := s.Session(ctx).Where(&EntityValues{EntityUUID: entityUuid}).Find(&models)
244 if tx.Error != nil {
245 return nil, evTagError(tx.Error)
246 }
247
248 values := make([]*idm.EntityValue, len(models))
249 for i, model := range models {
250 values[i] = model.AsEntityValue(&idm.EntityValue{})
251 }
252
253 return values, nil
254}
255
256func (s *evSqlImpl) validateUUIDs(uuids ...string) error {
257 for _, u := range uuids {

Callers

nothing calls this directly

Calls 6

evTagErrorFunction · 0.85
makeFunction · 0.85
AsEntityValueMethod · 0.80
WhereMethod · 0.65
SessionMethod · 0.65
FindMethod · 0.45

Tested by

no test coverage detected