start working on 0.7.x branch

- added FileLog which stores content to the file log
- now Log is only a wrapper - it puts messages to the local buffer and when logsave is used then the buffer is put to FileLog
- new base classes:
  WinixBase (Log, Config*, Synchro*)
  WinixModel : public WinixBase (morm::ModelConnector*, Plugin*)
  WinixSystem : public WinixModel (System*)
  WinixRequest : public WinixSystem (SLog, Cur*)
- singletons: log, slog, plugin are depracated - now references to them are in base classses (WinixBase, WinixModel)
- DbBase,  DbConn and Db are depracated - now we are using Morm project (in WinixModel there is a model_connector pointer)
  each thread will have its own ModelConnector





git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1146 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-11-21 11:03:53 +00:00
parent a7c47140ae
commit a2ffc1e81c
121 changed files with 7832 additions and 6662 deletions

View File

@@ -43,6 +43,8 @@
#include "core/error.h"
#include "space/spaceparser.h"
#include "date/date.h"
#include "core/winixbase.h"
namespace Winix
@@ -50,7 +52,7 @@ namespace Winix
class DbBase
class DbBase : public WinixBase
{
public:
@@ -67,21 +69,19 @@ public:
PGresult * AssertQuery(const char * q, ExecStatusType t);
PGresult * AssertQuery(const DbTextStream & query, ExecStatusType t);
void AssertResult(PGresult * r, ExecStatusType t);
static int AssertColumn(PGresult * r, const char * column_name);
int AssertColumn(PGresult * r, const char * column_name);
const char * AssertValue(PGresult * r, int row, int col);
const std::wstring & AssertValueWide(PGresult * r, int row, int col); // warning: this method uses a static buffer
void AssertValueWide(PGresult * r, int row, int col, std::wstring & result);
void AssertValueBin(PGresult * r, int row, int col, std::string & result);
long AssertValueLong(PGresult * r, int row, int col);
int AssertValueInt(PGresult * r, int row, int col);
bool AssertValueBool(PGresult * r, int row, int col);
unsigned long AssertValueULong(PGresult * r, int row, int col);
unsigned int AssertValueUInt(PGresult * r, int row, int col);
PT::Date AssertValueDate(PGresult * r, int row, int col);
// static assignments
static const char * AssertValue(PGresult * r, int row, int col);
static const std::wstring & AssertValueWide(PGresult * r, int row, int col); // warning: this method uses a static buffer
static void AssertValueWide(PGresult * r, int row, int col, std::wstring & result);
static void AssertValueBin(PGresult * r, int row, int col, std::string & result);
static long AssertValueLong(PGresult * r, int row, int col);
static int AssertValueInt(PGresult * r, int row, int col);
static bool AssertValueBool(PGresult * r, int row, int col);
static unsigned long AssertValueULong(PGresult * r, int row, int col);
static unsigned int AssertValueUInt(PGresult * r, int row, int col);
static PT::Date AssertValueDate(PGresult * r, int row, int col);
// non static assignments
bool AssertValueSpace(PGresult * r, int row, int col, PT::Space & space);
void ClearResult(PGresult * r);
@@ -104,7 +104,7 @@ public:
// new API (returns only bool)
bool EndTrans(bool everything_ok);
static void UnescapeBin(const char * str, size_t len, std::string & out, bool clear_out = true);
void UnescapeBin(const char * str, size_t len, std::string & out, bool clear_out = true);
protected:
@@ -126,7 +126,7 @@ private:
// static bool IsCorrectOctalDigit(char c);
// static int UnescapeBin(const char * str, size_t & i, size_t len);
static char UnescapeBinHexToDigit(char hex);
char UnescapeBinHexToDigit(char hex);
DbTextStream bquery;
PT::SpaceParser conf_parser;