DarkflameServer/dDatabase/CDClientDatabase.h
2021-12-05 18:54:36 +01:00

44 lines
857 B
C++

#pragma once
// C++
#include <string>
// SQLite
#include "CppSQLite3.h"
/*
* Optimization settings
*/
#include <sstream>
#include <iostream>
// Enable this to cache all entries in each table for fast access, comes with more memory cost
//#define CDCLIENT_CACHE_ALL
// Enable this to skip some unused columns in some tables
#define UNUSED(v)
/*!
\file CDClientDatabase.hpp
\brief An interface between the CDClient.sqlite file and the server
*/
//! 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);
};