DSL
DB_Common.h
1 //@AUTOHEADER@BEGIN@
2 /***********************************************************************\
3 | Drift Standard Libraries v1.01 |
4 | Copyright 2010-2023 Drift Solutions / Indy Sams |
5 | Docs and more information available at https://www.driftsolutions.dev |
6 | This file released under the 3-clause BSD license, |
7 | see included DSL.LICENSE.TXT file for details. |
8 \***********************************************************************/
9 //@AUTOHEADER@END@
10 
11 #ifndef __DB_COMMON_H__
12 #define __DB_COMMON_H__
13 
14 class DSL_API_CLASS SC_Row {
15 public:
16  map<string, string> Values;
17  size_t NumFields;
18 
19  SC_Row();
20  ~SC_Row();
21  void Reset();
22 
23  string Get(const string& fieldname, const string& sDefault = "");
24 };
25 
26 class DSL_API_CLASS SQLConxMulti {
27 public:
28  ~SQLConxMulti();
29 
30  void Query(const string& query);
31  size_t Count();
32 
33  vector<string> queries;
34 };
35 
36 class DSL_API_CLASS SQLConx {
37 public:
38  typedef int (*sql_printf_type)(const char * fmt, ...);
39  void SetOutput(sql_printf_type pprintf = NULL);
40 
41  virtual SQLConxMulti * MultiStart() = 0;
42  virtual bool MultiSend(SQLConxMulti *) = 0;
43  virtual bool MultiEnd(SQLConxMulti *) = 0;
44 
45 protected:
46  sql_printf_type sql_printf = NULL;
47 };
48 
49 #endif // __DB_COMMON_H__
Definition: DB_Common.h:14
Definition: DB_Common.h:26
Definition: DB_Common.h:36