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
logger
ILogger
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
sqliteConn
SqliteConnection
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
sqliteConn
SqliteConnectionlogResults
bool
Returns
HaveWriteAccessFile(FileInfo)
public static bool HaveWriteAccessFile(FileInfo file)
Parameters
file
FileInfo
Returns
HaveWriteAccessFolder(string)
public static bool HaveWriteAccessFolder(string folderPath)
Parameters
folderPath
string
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
filename
stringerrorMessage
stringrequireWriteAccess
boolcorruptionProtection
booldoIntegrityCheck
bool
Returns
Vacuum()
public void Vacuum()