Connection provides the main interface for thread-bound work with an opened Database object. Each thread working with the database should use its own connection.
public class Connection : IDisposable { /* Constructors */ public Connection(Database db) public Connection(Connection con) public Connection(Database db, byte[] context) /* Methods */ public void StartTransaction(Database.TransactionType type) public virtual void StartTransaction(Database.TransactionType type, Database.TransactionPriority pri, Database.IsolationLevel level) public virtual bool CommitTransaction() public bool CommitTransaction(int phase) public virtual bool CheckpointTransaction() public void SetCommitPolicy(Database.CommitPolicy policy) public void DiskFlush() public virtual void RollbackTransaction() public long Insert(Object obj) public T Create<T>() where T : class public T Create<T>(out long autoid) where T : class public long Count(Type cls) public void RemoveAll(Type cls) public virtual void Disconnect() public virtual void Dispose() public bool SaveSnapshot(String databaseSnapshotFilePath) public void SaveMetadata(String metadataFile, bool saveDefaults) public void SaveDictionary(String dictionaryFile) public bool SaveClass(String filePath, Type cls) public bool LoadClass(String filePath, Type cls, bool doMerge) public bool LoadClass(String filePath) public void SetCipherKeySnapshotTL(String cipherKey) public void IgnoreTtl(bool ignore) public bool IsTtlIgnored() public ClassStat GetClassStat(int ClassCode) public IndexStat GetIndexStat(Int16 index) public DiskInfo GetDiskInfo() public void WaitEvent(string name) public void StartEventListeners(string[] eventNames) public void ReleaseEvent(string name) public void ReleaseAllEvents() public virtual void CreateBackup(String fileName, String label, Database.BackupType type) public virtual void CreateBackup(String fileName, String label, Database.BackupType type, int compressionLevel, String cipher) public virtual void RestoreBackup(String fileName, String label) public void RestoreBackup(String fileName, String label, String cipher) public virtual Database.BackupInfo[] ListBackup(String fileName) public Table<T> GetTable<T>() where T : class public IEnumerable<T> Select<T>(Expression<Func<T,bool>> predicate) where T : class /* XML Export/Import */ public bool ExportXML(String filePath) public bool ImportXML(String filePath, int transactionSize) public bool ImportXML(String filePath) /* Properties */ public ICursor CurrentCursor { get; } public Int32 FreePages { get; } public Int32 TotalPages { get; } public Int16 DbPageSize { get; } public Int32 DiskPageSize { get; } public Int16 IndexStatCount { get; } public int NumberOfSequentialSearches { get; } /* Events */ public event AsyncEventHandler AsyncEvent public event AsyncEventErrorHandler AsyncEventError }
Connection(Database db)
Connection(Connection con)
Connection(Database db, byte[] context)
Disconnect()
Dispose()
Disconnect(); provided for IDisposable.StartTransaction(TransactionType type)
StartTransaction(TransactionType type, TransactionPriority pri, IsolationLevel level)
CommitTransaction()
CommitTransaction(int phase)
phase must be 1 or 2.CheckpointTransaction()
SetCommitPolicy(CommitPolicy policy)
DiskFlush()
Database.CommitPolicy.Buffered.RollbackTransaction()
Insert(Object obj)
Create<T>()
Create<T>(out long autoid)
Count(Type cls)
RemoveAll(Type cls)
SaveSnapshot(String path)
Database.Open.SaveMetadata(String file, bool saveDefaults)
SaveDictionary(String file)
SaveClass(String filePath, Type cls)
LoadClass(String filePath, Type cls, bool doMerge)
doMerge=false, the table is cleared before loading.LoadClass(String filePath)
doMerge=false).SetCipherKeySnapshotTL(String cipherKey)
ExportXML(String filePath)
ImportXML(String filePath, int transactionSize)
ImportXML(String filePath)
IgnoreTtl(bool ignore)
IsTtlIgnored()
GetClassStat(int ClassCode)
GetIndexStat(Int16 index)
GetDiskInfo()
FreePages
TotalPages
DbPageSize
DiskPageSize
IndexStatCount
GetIndexStat().WaitEvent(string name)
StartEventListeners(string[] eventNames)
ReleaseEvent(string name)
ReleaseAllEvents()
CreateBackup(...)
RestoreBackup(...)
ListBackup(String fileName)
GetTable<T>()
T.Select<T>(Expression<Func<T,bool>> predicate)
NumberOfSequentialSearches
CurrentCursor
AsyncEvent
AsyncEventError