ln.types/odb/ng/storage/IStorage.cs

33 lines
772 B
C#

using System;
using System.Collections.Generic;
using ln.types.odb.values;
namespace ln.types.odb.ng.storage
{
public interface IStorage : IDisposable
{
bool Open();
void Close();
bool IsOpen { get; }
Document Load(Guid documentID);
void Save(Document document);
bool LockDocument(Guid documentID);
bool ReleaseDocument(Guid documentID);
void SaveRelease(Document document);
bool GetDocumentLocked(Guid documentID);
void Delete(Guid documentID);
bool Contains(Guid documentID);
IEnumerable<Guid> GetDocumentIDs();
IEnumerable<Guid> GetDocumentIDs(string path,Predicate<ODBEntity> predicate);
DateTime GetStorageTimestamp(Guid documentID);
void EnsureIndex(params string[] path);
}
}