Pol  Revision:f37d500
sqlmod.h
Go to the documentation of this file.
1 
7 #ifndef SQLMOD_H
8 #define SQLMOD_H
9 
10 #include <string>
11 
12 #include "../../bscript/execmodl.h"
13 #include "../uoexec.h"
14 
15 namespace Pol
16 {
17 namespace Bscript
18 {
19 class BObjectImp;
20 class Executor;
21 class ObjArray;
22 } // namespace Bscript
23 namespace Core
24 {
25 class UOExecutor;
26 } // namespace Core
27 } // namespace Pol
28 template <class T>
29 class weak_ptr;
30 
31 namespace Pol
32 {
33 namespace Core
34 {
35 class BSQLConnection;
36 }
37 namespace Module
38 {
39 class SQLExecutorModule : public Bscript::TmplExecutorModule<SQLExecutorModule>
40 {
41 public:
43 
44  Bscript::BObjectImp* mf_ConnectToDB();
45  Bscript::BObjectImp* mf_Query();
46  Bscript::BObjectImp* mf_Close();
47  Bscript::BObjectImp* mf_NumFields();
48  Bscript::BObjectImp* mf_AffectedRows();
49  Bscript::BObjectImp* mf_FetchRow();
50  Bscript::BObjectImp* mf_NumRows();
51  Bscript::BObjectImp* mf_SelectDb();
52  Bscript::BObjectImp* mf_FieldName();
53 
54  static Bscript::BObjectImp* background_connect( weak_ptr<Core::UOExecutor> uoexec,
55  const std::string host,
56  const std::string username,
57  const std::string password );
58  static Bscript::BObjectImp* background_select( weak_ptr<Core::UOExecutor> uoexec,
59  Core::BSQLConnection* sql, const std::string db );
60  static Bscript::BObjectImp* background_query( weak_ptr<Core::UOExecutor> uoexec,
61  Core::BSQLConnection* sql, const std::string query,
62  const Bscript::ObjArray* params );
63 
64 private:
66 };
67 }
68 }
69 #endif
Core::UOExecutor & uoexec
Definition: sqlmod.h:65
Definition: berror.cpp:12