Public Member Functions

LightweightDatabaseClient Class Reference
[MySQLNetworkedDatabase]

The client interface to the simple database included with RakNet, useful for a server browser or a lobby server. More...

#include <LightweightDatabaseClient.h>

Inherits PluginInterface2.

Collaboration diagram for LightweightDatabaseClient:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LightweightDatabaseClient ()
virtual ~LightweightDatabaseClient ()
void QueryTable (const char *tableName, const char *queryPassword, const char **columnNamesSubset, unsigned char numColumnSubset, DatabaseFilter *filter, unsigned char numFilters, unsigned *rowIds, unsigned char numRowIDs, SystemAddress systemAddress, bool broadcast)
void UpdateRow (const char *tableName, const char *updatePassword, RowUpdateMode updateMode, bool hasRowId, unsigned rowId, DatabaseCellUpdate *cellUpdates, unsigned char numCellUpdates, SystemAddress systemAddress, bool broadcast)
void RemoveRow (const char *tableName, const char *removePassword, unsigned rowId, SystemAddress systemAddress, bool broadcast)

Detailed Description

The client interface to the simple database included with RakNet, useful for a server browser or a lobby server.

Deprecated:
Use RakNet::SQLite3ClientPlugin found at DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h

Definition at line 29 of file LightweightDatabaseClient.h.


Constructor & Destructor Documentation

LightweightDatabaseClient::LightweightDatabaseClient (  ) 

Definition at line 16 of file LightweightDatabaseClient.cpp.

LightweightDatabaseClient::~LightweightDatabaseClient (  )  [virtual]

Definition at line 19 of file LightweightDatabaseClient.cpp.


Member Function Documentation

void LightweightDatabaseClient::QueryTable ( const char *  tableName,
const char *  queryPassword,
const char **  columnNamesSubset,
unsigned char  numColumnSubset,
DatabaseFilter filter,
unsigned char  numFilters,
unsigned *  rowIds,
unsigned char  numRowIDs,
SystemAddress  systemAddress,
bool  broadcast 
)

Sends a query to a remote table. The remote system should return ID_DATABASE_QUERY_REPLY, ID_DATABASE_UNKNOWN_TABLE, or ID_DATABASE_INCORRECT_PASSWORD

Note:
If the remote table uses a password and you send the wrong one you will be silently disconnected and banned for one second.
Parameters:
[in] tableName String name of the remote table. Case sensitive.
[in] queryPassword Password to query the remote table, if any.
[in] columnSubset An array of string names of the columns to query. The resulting table will return the columns in this same order. Pass 0 for all columns.
[in] numColumnSubset The number of elements in the columnSubset array
[in] filter Filters to apply to the query. For each row the filters are applied. All filters must be passed for the row to be returned. Pass 0 for no filters.
[in] numFilters The number of elements in the filter array
[in] rowIds Which particular rows to return. Pass 0 for all rows.
[in] numRowIDs The number of elements in the rowIds array
[in] systemAddress Which system to send to.
[in] broadcast Broadcast or not. Same as the parameter in RakPeer::Send

Definition at line 23 of file LightweightDatabaseClient.cpp.

Here is the call graph for this function:

void LightweightDatabaseClient::RemoveRow ( const char *  tableName,
const char *  removePassword,
unsigned  rowId,
SystemAddress  systemAddress,
bool  broadcast 
)

Removes a remote row, assuming the server allows row removal. No response is returned by the server.

Parameters:
[in] tableName String name of the remote table. Case sensitive.
[in] removePassword Password to remove rows from the remote table, if any.
[in] rowId The rowID of the existing row.
[in] systemAddress Which system to send to.
[in] broadcast Broadcast or not. Same as the parameter in RakPeer::Send

Definition at line 63 of file LightweightDatabaseClient.cpp.

Here is the call graph for this function:

void LightweightDatabaseClient::UpdateRow ( const char *  tableName,
const char *  updatePassword,
RowUpdateMode  updateMode,
bool  hasRowId,
unsigned  rowId,
DatabaseCellUpdate cellUpdates,
unsigned char  numCellUpdates,
SystemAddress  systemAddress,
bool  broadcast 
)

Sets one or more values in a new or existing row, assuming the server allows row creation and updates. No response is returned by the server.

Parameters:
[in] tableName String name of the remote table. Case sensitive.
[in] updatePassword Password to update the remote table, if any.
[in] updateMode See RowUpdateMode in LightweightDatabaseCommon.h . This determines if to update an existing or new row.
[in] hasRowId True if a valid value was passed for rowId, false otherwise. If false, will lookup the row by system address. Required if adding a new row and the remote system does not automatically create rowIDs.
[in] rowId The rowID of the new or existing row.
[in] cellUpdates An array of DatabaseCellUpdate structures containing the values to write to the remote row.
[in] numCellUpdates The number of elements in the cellUpdates array
[in] systemAddress Which system to send to.
[in] broadcast Broadcast or not. Same as the parameter in RakPeer::Send

Definition at line 87 of file LightweightDatabaseClient.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: