VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfDatabaseSqlUtils.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
8 #include <vrfMsgTransport/vrfDatabaseEventParam.inl>
10 
13 
15 inline std::string sqlCreateTableQuery(const DtVrfDatabaseEvent& event);
16 
20 inline std::string sqliteInsertIgnoreQuery(const DtVrfDatabaseEventVector& events);
21 
25 inline std::string mySqlInsertIgnoreQuery(const DtVrfDatabaseEventVector& event);
26 
30 inline std::string sqliteInsertUpdateQuery(const DtVrfDatabaseEventVector& event);
31 
35 inline std::string mySqlInsertUpdateQuery(const DtVrfDatabaseEventVector& event);
36 
39 inline std::string sqlUpdateQuery(const DtVrfDatabaseEvent& event);
40 
43 inline std::string sqlCreationString(const DtVrfDatabaseEventParam& p);
44 
47 inline std::string sqlName(const DtVrfDatabaseEventParam& p);
48 
51 inline std::string sqlValue(const DtVrfDatabaseEventParam& p);
52 
55 inline std::string sqlExcludedSet(const DtVrfDatabaseEventParam& p);
56 
57 #include <vrfMsgTransport/vrfDatabaseSqlUtils.inl>
std::string sqlCreationString(const DtVrfDatabaseEventParam &p)
Creates a string to be used by sqlCreateTableQuery() when constructing a table to specify the correct...
std::vector< DtVrfDatabaseEventUniquePtr > DtVrfDatabaseEventVector
Definition: vrfDatabaseEvent.h:183
std::string sqlUpdateQuery(const DtVrfDatabaseEvent &event)
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.
std::string sqlName(const DtVrfDatabaseEventParam &p)
Creates a string to be used by an insert query when inserting an event to specify the correct name fo...
std::string sqliteInsertUpdateQuery(const DtVrfDatabaseEventVector &event)
Creates an SQLite query 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!
std::string sqliteInsertIgnoreQuery(const DtVrfDatabaseEventVector &events)
Creates an SQLite query to insert multiple database events into the appropriate table, ignoring errors on conflicts. NOTE: Only works if all events have the same event type!
Abstract base class to store the parameter for a DtVrfDatabaseEvent.
Definition: vrfDatabaseEventParam.h:11
std::string mySqlInsertIgnoreQuery(const DtVrfDatabaseEventVector &event)
Creates a MySQL query to insert multiple database events into the appropriate table, ignoring errors on conflicts. NOTE: Only works if all events have the same event type!
std::string sqlExcludedSet(const DtVrfDatabaseEventParam &p)
Creates a string to be used by an insert query needs to update a parameter when a duplicate entry is ...
std::string mySqlInsertUpdateQuery(const DtVrfDatabaseEventVector &event)
Creates a MySQL query 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!
std::string sqlValue(const DtVrfDatabaseEventParam &p)
Creates a string to be used by an insert query when inserting an event to specify the correct value f...
Represents a single event to be recorded in the database. Anytime something occurs that requires data...
Definition: vrfDatabaseEvent.h:22
std::string sqlCreateTableQuery(const DtVrfDatabaseEvent &event)
Provides functions to turn a DtVrfDatabaseEvent and it&#39;s parameters into an SQL query.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)