Class SQLiteDBConnection
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class SQLiteDBConnection : IDisposable
- Inheritance
-
SQLiteDBConnection
- Implements
- Inherited Members
- Extension Methods
Constructors
SQLiteDBConnection(ILogger)
public SQLiteDBConnection(ILogger logger)
Parameters
loggerILogger
Fields
databaseFileName
protected string databaseFileName
Field Value
logger
protected ILogger logger
Field Value
sqliteConn
protected SqliteConnection sqliteConn
Field Value
transactionLock
public object transactionLock
Field Value
Properties
DBTypeCode
public virtual string DBTypeCode { get; }
Property Value
IsReadOnly
public bool IsReadOnly { get; protected set; }
Property Value
Methods
Close()
public virtual void Close()
CreateParameter(string, DbType, object, DbCommand)
protected DbParameter CreateParameter(string parameterName, DbType dbType, object value, DbCommand command)
Parameters
Returns
CreateTablesIfNotExists(SqliteConnection)
protected virtual void CreateTablesIfNotExists(SqliteConnection sqliteConn)
Parameters
sqliteConnSqliteConnection
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public virtual void Dispose()
DoIntegrityCheck(SqliteConnection, bool)
public bool DoIntegrityCheck(SqliteConnection sqliteConn, bool logResults = true)
Parameters
sqliteConnSqliteConnectionlogResultsbool
Returns
HaveWriteAccessFile(FileInfo)
public static bool HaveWriteAccessFile(FileInfo file)
Parameters
fileFileInfo
Returns
HaveWriteAccessFolder(string)
public static bool HaveWriteAccessFolder(string folderPath)
Parameters
folderPathstring
Returns
OnOpened()
public virtual void OnOpened()
OpenOrCreate(string, ref string, bool, bool, bool)
public bool OpenOrCreate(string filename, ref string errorMessage, bool requireWriteAccess, bool corruptionProtection, bool doIntegrityCheck)
Parameters
filenamestringerrorMessagestringrequireWriteAccessboolcorruptionProtectionbooldoIntegrityCheckbool
Returns
Vacuum()
public void Vacuum()