VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Static Public Member Functions | Static Protected Member Functions
DtSqlUtils Class Reference

Provides functions to turn a DtVrfDatabaseEvent and it's parameters into an SQL query string.

Static Public Member Functions

static std::string createTableStatement (const DtVrfDatabaseEvent &event)
 
static std::string sqliteInsertIgnoreStatement (const DtVrfDatabaseEventVector &events)
 
static std::string mySqlInsertIgnoreStatement (const DtVrfDatabaseEventVector &event)
 
static std::string sqliteInsertUpdateStatement (const DtVrfDatabaseEventVector &event)
 
static std::string mySqlInsertUpdateStatement (const DtVrfDatabaseEventVector &event)
 
static std::string updateStatement (const DtVrfDatabaseEvent &event)
 

Static Protected Member Functions

static std::string creationString (const DtVrfDatabaseEventParam &p)
 
static std::string parameterNameString (const DtVrfDatabaseEventParam &p)
 
static std::string parameterValueString (const DtVrfDatabaseEventParam &p)
 
static std::string excludedSetString (const DtVrfDatabaseEventParam &p)
 
static bool appendTableName (DtVrfDatabaseEvent::EventType et, std::string &qry)
 
static bool appendParameterNames (const DtVrfDatabaseEvent::ParamVector &params, std::string &qry)
 
static bool appendParameterValues (const DtVrfDatabaseEvent::ParamVector &params, std::string &qry)
 
static bool appendParameterSetExcluded (const DtVrfDatabaseEvent::ParamVector &params, std::string &qry)
 

Member Function Documentation

static std::string DtSqlUtils::createTableStatement ( const DtVrfDatabaseEvent event)
inlinestatic

Creates an SQL statement to create a table to hold events of this type.

static std::string DtSqlUtils::sqliteInsertIgnoreStatement ( const DtVrfDatabaseEventVector events)
inlinestatic

Creates an SQLite statement to insert multiple database events into the appropriate table, ignoring errors on conflicts. NOTE: Only works if all events have the same event type!

static std::string DtSqlUtils::mySqlInsertIgnoreStatement ( const DtVrfDatabaseEventVector event)
inlinestatic

Creates a MySQL statement to insert multiple database events into the appropriate table, ignoring errors on conflicts. NOTE: Only works if all events have the same event type!

static std::string DtSqlUtils::sqliteInsertUpdateStatement ( const DtVrfDatabaseEventVector event)
inlinestatic

Creates an SQLite statement to insert multiple database events into the appropriate table, updating the existing entry on conflicts. NOTE: Only works if all events have the same event type!

static std::string DtSqlUtils::mySqlInsertUpdateStatement ( const DtVrfDatabaseEventVector event)
inlinestatic

Creates a MySQL statement to insert multiple database events into the appropriate table, updating the existing entry on conflicts. NOTE: Only works if all events have the same event type!

static std::string DtSqlUtils::updateStatement ( const DtVrfDatabaseEvent event)
inlinestatic

Creates an SQL query to update an existing database event in the appropriate table. Requires the event to have at least one parameter designated as a primary key.

static std::string DtSqlUtils::creationString ( const DtVrfDatabaseEventParam p)
inlinestaticprotected

Creates a string to be used by createTableStatement() when constructing a table to specify the correct name and type for the given parameter.

static std::string DtSqlUtils::parameterNameString ( const DtVrfDatabaseEventParam p)
inlinestaticprotected

Creates a string to be used by an insert query when inserting an event to specify the correct name for the given parameter.

static std::string DtSqlUtils::parameterValueString ( const DtVrfDatabaseEventParam p)
inlinestaticprotected

Creates a string to be used by an insert query when inserting an event to specify the correct value for the given parameter.

static std::string DtSqlUtils::excludedSetString ( const DtVrfDatabaseEventParam p)
inlinestaticprotected

Creates a string to be used by an insert query needs to update a parameter when a duplicate entry is found.

static bool DtSqlUtils::appendTableName ( DtVrfDatabaseEvent::EventType  et,
std::string &  qry 
)
inlinestaticprotected
static bool DtSqlUtils::appendParameterNames ( const DtVrfDatabaseEvent::ParamVector params,
std::string &  qry 
)
inlinestaticprotected
static bool DtSqlUtils::appendParameterValues ( const DtVrfDatabaseEvent::ParamVector params,
std::string &  qry 
)
inlinestaticprotected
static bool DtSqlUtils::appendParameterSetExcluded ( const DtVrfDatabaseEvent::ParamVector params,
std::string &  qry 
)
inlinestaticprotected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)