Table of Contents

Class SQLiteDBConnection

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class SQLiteDBConnection : IDisposable
Inheritance
SQLiteDBConnection
Implements
Inherited Members

Constructors

SQLiteDBConnection(ILogger)

public SQLiteDBConnection(ILogger logger)

Parameters

logger ILogger

Fields

databaseFileName

protected string databaseFileName

Field Value

string

logger

protected ILogger logger

Field Value

ILogger

sqliteConn

protected SqliteConnection sqliteConn

Field Value

SqliteConnection

transactionLock

public object transactionLock

Field Value

object

Properties

DBTypeCode

public virtual string DBTypeCode { get; }

Property Value

string

IsReadOnly

public bool IsReadOnly { get; protected set; }

Property Value

bool

Methods

Close()

public virtual void Close()

CreateParameter(string, DbType, object, DbCommand)

protected DbParameter CreateParameter(string parameterName, DbType dbType, object value, DbCommand command)

Parameters

parameterName string
dbType DbType
value object
command DbCommand

Returns

DbParameter

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 SqliteConnection
logResults bool

Returns

bool

HaveWriteAccessFile(FileInfo)

public static bool HaveWriteAccessFile(FileInfo file)

Parameters

file FileInfo

Returns

bool

HaveWriteAccessFolder(string)

public static bool HaveWriteAccessFolder(string folderPath)

Parameters

folderPath string

Returns

bool

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 string
errorMessage string
requireWriteAccess bool
corruptionProtection bool
doIntegrityCheck bool

Returns

bool

Vacuum()

public void Vacuum()