BiowareDB

Bioware database (in FoxPro format, ie dbf, cdx and ftp files)

Constructors

this
this(ubyte[] dbfData, ubyte[] cdxData, ubyte[] fptData, bool buildIndex)

Constructor with raw data Note: data will be copied inside the class

this
this(string dbfPath, string cdxPath, string fptPath, bool buildIndex)

Constructor with file paths

this
this(string dbFilesPath, bool buildIndex)

Constructor with file path without its extension. It will try to open the dbf and ftp files.

Members

Aliases

opIndex
alias opIndex = getVariable

Alias for getVariable

Enums

VarType
enum VarType

Type of a stored variable

Functions

deleteVariable
void deleteVariable(size_t index)

Remove a variable

deleteVariable
void deleteVariable(PCID pcid, string varName)

Remove a variable

getVariable
Variable getVariable(size_t index)

Get variable information using its index

getVariable
Nullable!Variable getVariable(PCID pcid, string varName)

Search and return variable information

getVariable
Nullable!Variable getVariable(string account, string character, string varName)

Search and return variable information

getVariableIndex
Nullable!size_t getVariableIndex(PCID pcid, string varName)

Search and return the index of a variable

getVariableIndex
Nullable!size_t getVariableIndex(string account, string character, string varName)

Search and return the index of a variable

getVariableValue
const(T) getVariableValue(size_t index)

Get the variable value at index Note: Can be used to retrieve deleted variable values.

getVariableValue
Nullable!(const(T)) getVariableValue(PCID pcid, string varName)

Search and return the value of a variable

getVariableValue
Nullable!(const(T)) getVariableValue(string account, string character, string varName)

Search and return the value of a variable

getVariableValueJSON
JSONValue getVariableValueJSON(size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
getVariableValueString
const(string) getVariableValueString(size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(in Variable) dlg)
int opApply(int delegate(size_t, in Variable) dlg)

Iterate over all variables (both active and deleted) Note: You need to check Variable.deleted value.

serialize
auto serialize()

Returns a tuple with dbf and fpt raw data (accessible with .dbf and .fpt) Warning: Does not serialize cdx file

setVariableValue
void setVariableValue(size_t index, T value, bool updateTimestamp)

Set the value of an existing variable using its index.

setVariableValue
void setVariableValue(PCID pcid, string varName, T value, bool updateTimestamp)

Set / create a variable with its value

Properties

length
size_t length [@property getter]

Number of variables (both active an deleted) stored in the database

Structs

Variable
struct Variable

Representation of a stored variable

Templates

toVarType
template toVarType(T)

Convert a BiowareDB.VarType into the associated native type

Meta