mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-04 04:33:36 +00:00
5eca25e42a
* Move away from constructor queries Fix up other large tables to have proper backup lookups Revert "idk im just dumb ig" This reverts commit 5d5be5df53b8959b42b291613d7db749a65a3585. idk im just dumb ig * Fix slow components registry lookup * add define for cdclient cache all * Update CDBehaviorParameterTable.cpp
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
#pragma once
|
|
|
|
// C++
|
|
#include <string>
|
|
|
|
// SQLite
|
|
#include "CppSQLite3.h"
|
|
|
|
/*
|
|
* Optimization settings
|
|
*/
|
|
|
|
#include <sstream>
|
|
#include <iostream>
|
|
|
|
//! The CDClient Database namespace
|
|
namespace CDClientDatabase {
|
|
|
|
//! Opens a connection with the CDClient
|
|
/*!
|
|
\param filename The filename
|
|
*/
|
|
void Connect(const std::string& filename);
|
|
|
|
//! Queries the CDClient
|
|
/*!
|
|
\param query The query
|
|
\return The results of the query
|
|
*/
|
|
CppSQLite3Query ExecuteQuery(const std::string& query);
|
|
|
|
//! Updates the CDClient file with Data Manipulation Language (DML) commands.
|
|
/*!
|
|
\param query The DML command to run. DML command can be multiple queries in one string but only
|
|
the last one will return its number of updated rows.
|
|
\return The number of updated rows.
|
|
*/
|
|
int ExecuteDML(const std::string& query);
|
|
|
|
//! Queries the CDClient and parses arguments
|
|
/*!
|
|
\param query The query with formatted arguments
|
|
\return prepared SQLite Statement
|
|
*/
|
|
CppSQLite3Statement CreatePreppedStmt(const std::string& query);
|
|
};
|