Updated TLK for PRC8 update
Updated TLK for PRC8 update. Added placeable house blueprints. Updated NWNxEE. Full compile.
This commit is contained in:
@@ -61,6 +61,16 @@ void NWNX_SQL_PreparedObjectId(int position, object value);
|
||||
/// @param base64 Use base64-encoded string format if TRUE (default), otherwise use binary format.
|
||||
void NWNX_SQL_PreparedObjectFull(int position, object value, int base64 = TRUE);
|
||||
|
||||
/// @brief Set the NULL value of a prepared statement at given position.
|
||||
/// @param position The nth ? in a prepared statement.
|
||||
void NWNX_SQL_PreparedNULL(int position);
|
||||
|
||||
/// @brief Set the Json value of a prepared statement at given position.
|
||||
/// Convienence function to match other Prepared(type) functions.
|
||||
/// @param position The nth ? in a prepared statement.
|
||||
/// @param value The value to set.
|
||||
void NWNX_SQL_PreparedJson(int position, json value);
|
||||
|
||||
/// @brief Like NWNX_SQL_ReadDataInActiveRow, but for full serialized objects.
|
||||
///
|
||||
/// The object will be deserialized and created in the game. New object ID is returned.
|
||||
@@ -98,15 +108,19 @@ string NWNX_SQL_GetLastError();
|
||||
/// @return Returns the number of parameters expected by the prepared query or -1 if no query is prepared.
|
||||
int NWNX_SQL_GetPreparedQueryParamCount();
|
||||
|
||||
/// @brief Set the next query to return full binary results **ON THE FIRST COLUMN ONLY**.
|
||||
/// @note This is ONLY needed on PostgreSQL, and ONLY if you want to deserialize raw bytea in NWNX_SQL_ReadFullObjectInActiveRow with base64=FALSE.
|
||||
void NWNX_SQL_PostgreSQL_SetNextQueryResultsBinaryMode();
|
||||
|
||||
/// @}
|
||||
|
||||
int NWNX_SQL_PrepareQuery(string query)
|
||||
{
|
||||
string sFunc = "PrepareQuery";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_SQL, sFunc, query);
|
||||
NWNX_PushArgumentString(query);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
int NWNX_SQL_ExecutePreparedQuery()
|
||||
@@ -114,7 +128,7 @@ int NWNX_SQL_ExecutePreparedQuery()
|
||||
string sFunc = "ExecutePreparedQuery";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
int NWNX_SQL_ExecuteQuery(string query)
|
||||
@@ -135,7 +149,7 @@ int NWNX_SQL_ReadyToReadNextRow()
|
||||
string sFunc = "ReadyToReadNextRow";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_SQL_ReadNextRow()
|
||||
@@ -149,9 +163,9 @@ string NWNX_SQL_ReadDataInActiveRow(int column = 0)
|
||||
{
|
||||
string sFunc = "ReadDataInActiveRow";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, column);
|
||||
NWNX_PushArgumentInt(column);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
|
||||
@@ -159,59 +173,70 @@ void NWNX_SQL_PreparedInt(int position, int value)
|
||||
{
|
||||
string sFunc = "PreparedInt";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, value);
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, position);
|
||||
NWNX_PushArgumentInt(value);
|
||||
NWNX_PushArgumentInt(position);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
}
|
||||
void NWNX_SQL_PreparedString(int position, string value)
|
||||
{
|
||||
string sFunc = "PreparedString";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_SQL, sFunc, value);
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, position);
|
||||
NWNX_PushArgumentString(value);
|
||||
NWNX_PushArgumentInt(position);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
|
||||
}
|
||||
void NWNX_SQL_PreparedFloat(int position, float value)
|
||||
{
|
||||
string sFunc = "PreparedFloat";
|
||||
|
||||
NWNX_PushArgumentFloat(NWNX_SQL, sFunc, value);
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, position);
|
||||
NWNX_PushArgumentFloat(value);
|
||||
NWNX_PushArgumentInt(position);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
|
||||
}
|
||||
void NWNX_SQL_PreparedObjectId(int position, object value)
|
||||
{
|
||||
string sFunc = "PreparedObjectId";
|
||||
|
||||
NWNX_PushArgumentObject(NWNX_SQL, sFunc, value);
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, position);
|
||||
NWNX_PushArgumentObject(value);
|
||||
NWNX_PushArgumentInt(position);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
|
||||
}
|
||||
void NWNX_SQL_PreparedObjectFull(int position, object value, int base64 = TRUE)
|
||||
{
|
||||
string sFunc = "PreparedObjectFull";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, base64);
|
||||
NWNX_PushArgumentObject(NWNX_SQL, sFunc, value);
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, position);
|
||||
NWNX_PushArgumentInt(base64);
|
||||
NWNX_PushArgumentObject(value);
|
||||
NWNX_PushArgumentInt(position);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
}
|
||||
void NWNX_SQL_PreparedNULL(int position)
|
||||
{
|
||||
string sFunc = "PreparedNULL";
|
||||
|
||||
NWNX_PushArgumentInt(position);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
}
|
||||
void NWNX_SQL_PreparedJson(int position, json value)
|
||||
{
|
||||
// Dump to string and continue as a string from here.
|
||||
// Famously assuming we're sent valid Json here.
|
||||
NWNX_SQL_PreparedString(position, JsonDump(value));
|
||||
}
|
||||
|
||||
|
||||
object NWNX_SQL_ReadFullObjectInActiveRow(int column = 0, object owner = OBJECT_INVALID, float x = 0.0, float y = 0.0, float z = 0.0, int base64 = TRUE)
|
||||
{
|
||||
string sFunc = "ReadFullObjectInActiveRow";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, base64);
|
||||
NWNX_PushArgumentFloat(NWNX_SQL, sFunc, z);
|
||||
NWNX_PushArgumentFloat(NWNX_SQL, sFunc, y);
|
||||
NWNX_PushArgumentFloat(NWNX_SQL, sFunc, x);
|
||||
NWNX_PushArgumentObject(NWNX_SQL, sFunc, owner);
|
||||
NWNX_PushArgumentInt(NWNX_SQL, sFunc, column);
|
||||
NWNX_PushArgumentInt(base64);
|
||||
NWNX_PushArgumentFloat(z);
|
||||
NWNX_PushArgumentFloat(y);
|
||||
NWNX_PushArgumentFloat(x);
|
||||
NWNX_PushArgumentObject(owner);
|
||||
NWNX_PushArgumentInt(column);
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueObject(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueObject();
|
||||
}
|
||||
|
||||
int NWNX_SQL_GetAffectedRows()
|
||||
@@ -219,7 +244,7 @@ int NWNX_SQL_GetAffectedRows()
|
||||
string sFunc = "GetAffectedRows";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
string NWNX_SQL_GetDatabaseType()
|
||||
@@ -227,7 +252,7 @@ string NWNX_SQL_GetDatabaseType()
|
||||
string sFunc = "GetDatabaseType";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
void NWNX_SQL_DestroyPreparedQuery()
|
||||
@@ -242,7 +267,7 @@ string NWNX_SQL_GetLastError()
|
||||
string sFunc = "GetLastError";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
int NWNX_SQL_GetPreparedQueryParamCount()
|
||||
@@ -250,5 +275,12 @@ int NWNX_SQL_GetPreparedQueryParamCount()
|
||||
string sFunc = "GetPreparedQueryParamCount";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_SQL, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_SQL_PostgreSQL_SetNextQueryResultsBinaryMode()
|
||||
{
|
||||
string sFunc = "PostgreSQL_SetNextQueryResultsBinaryMode";
|
||||
|
||||
NWNX_CallFunction(NWNX_SQL, sFunc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user