public void SaveProperties(object fileId, EntryProperties entryProperties) { var selector = GetSelector(fileId); using (var fileDao = selector.GetFileDao(fileId)) { fileDao.SaveProperties(selector.ConvertId(fileId), entryProperties); } }
public EntryProperties GetProperties(object fileId) { var query = Query("files_properties") .Select("data") .Where("entry_id", fileId); return(dbManager .ExecuteList(Query("files_properties") .Select("data") .Where(Exp.Eq("entry_id", fileId))) .ConvertAll(r => { return EntryProperties.Parse((string)r[0]); }) .SingleOrDefault()); }
public void SaveProperties(object fileId, EntryProperties entryProperties) { string data; if (entryProperties == null || string.IsNullOrEmpty(data = EntryProperties.Serialize(entryProperties))) { dbManager.ExecuteNonQuery( Delete("files_properties") .Where("entry_id", fileId)); return; } dbManager.ExecuteNonQuery(Insert("files_properties") .InColumnValue("entry_id", fileId) .InColumnValue("data", data)); }
public async Task <IEnumerable <DatasetDto> > List(string orgSlug) { var org = await _utils.GetOrganization(orgSlug); var res = new List <DatasetDto>(); foreach (var ds in org.Datasets.ToArray()) { var ddb = _ddbManager.Get(orgSlug, ds.InternalRef); var info = await ddb.GetInfoAsync(); var attributes = new EntryProperties(info.Properties); res.Add(new DatasetDto { Slug = ds.Slug, CreationDate = ds.CreationDate, Properties = attributes.Properties, Size = info.Size }); } return(res.ToArray()); }
public void SaveProperties(object fileId, EntryProperties entryProperties) { }
public Entry() { propsA3 = new EntryProperties(this); }