Class: Quickfix::PostgreSQLConnection

Inherits:
Object
  • Object
show all
Defined in:
ext/quickfix/QuickfixRuby.cpp

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object



119046
119047
119048
119049
119050
119051
119052
119053
119054
119055
119056
119057
119058
119059
119060
119061
119062
119063
119064
119065
119066
119067
119068
119069
119070
119071
119072
119073
119074
119075
119076
119077
119078
119079
119080
119081
119082
119083
119084
119085
119086
119087
119088
119089
119090
119091
119092
119093
119094
119095
119096
119097
119098
# File 'ext/quickfix/QuickfixRuby.cpp', line 119046

SWIGINTERN VALUE _wrap_new_PostgreSQLConnection(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs;
  if (argc > 5) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 1) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__DatabaseConnectionID, SWIG_POINTER_NO_NULL);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_PostgreSQLConnection__SWIG_0(nargs, args, self);
    }
  }
  if (argc == 5) {
    int _v = 0;
    int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_short(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_PostgreSQLConnection__SWIG_1(nargs, args, self);
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "PostgreSQLConnection.new", 
    "    PostgreSQLConnection.new(FIX::DatabaseConnectionID const &id)\n"
    "    PostgreSQLConnection.new(std::string const &database, std::string const &user, std::string const &password, std::string const &host, short port)\n");
  
  return Qnil;
}

Instance Method Details

#connected(*args) ⇒ Object



119142
119143
119144
119145
119146
119147
119148
119149
119150
119151
119152
119153
119154
119155
119156
119157
119158
119159
119160
119161
119162
119163
119164
119165
119166
119167
119168
119169
119170
119171
119172
119173
119174
# File 'ext/quickfix/QuickfixRuby.cpp', line 119142

SWIGINTERN VALUE
_wrap_PostgreSQLConnection_connected(int argc, VALUE *argv, VALUE self) {
  FIX::PostgreSQLConnection *arg1 = (FIX::PostgreSQLConnection *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FIX__PostgreSQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::PostgreSQLConnection *","connected", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::PostgreSQLConnection * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (bool)(arg1)->connected();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#connectionID(*args) ⇒ Object



119107
119108
119109
119110
119111
119112
119113
119114
119115
119116
119117
119118
119119
119120
119121
119122
119123
119124
119125
119126
119127
119128
119129
119130
119131
119132
119133
119134
119135
119136
119137
119138
119139
# File 'ext/quickfix/QuickfixRuby.cpp', line 119107

SWIGINTERN VALUE
_wrap_PostgreSQLConnection_connectionID(int argc, VALUE *argv, VALUE self) {
  FIX::PostgreSQLConnection *arg1 = (FIX::PostgreSQLConnection *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FIX::DatabaseConnectionID *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FIX__PostgreSQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::PostgreSQLConnection *","connectionID", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::PostgreSQLConnection * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (FIX::DatabaseConnectionID *) &(arg1)->connectionID();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FIX__DatabaseConnectionID, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#execute(*args) ⇒ Object



119212
119213
119214
119215
119216
119217
119218
119219
119220
119221
119222
119223
119224
119225
119226
119227
119228
119229
119230
119231
119232
119233
119234
119235
119236
119237
119238
119239
119240
119241
119242
119243
119244
119245
119246
119247
119248
119249
119250
119251
119252
119253
119254
119255
# File 'ext/quickfix/QuickfixRuby.cpp', line 119212

SWIGINTERN VALUE
_wrap_PostgreSQLConnection_execute(int argc, VALUE *argv, VALUE self) {
  FIX::PostgreSQLConnection *arg1 = (FIX::PostgreSQLConnection *) 0 ;
  FIX::PostgreSQLQuery *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FIX__PostgreSQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::PostgreSQLConnection *","execute", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::PostgreSQLConnection * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FIX__PostgreSQLQuery,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FIX::PostgreSQLQuery &","execute", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FIX::PostgreSQLQuery &","execute", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FIX::PostgreSQLQuery * >(argp2);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (bool)(arg1)->execute(*arg2);
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#reconnect(*args) ⇒ Object



119177
119178
119179
119180
119181
119182
119183
119184
119185
119186
119187
119188
119189
119190
119191
119192
119193
119194
119195
119196
119197
119198
119199
119200
119201
119202
119203
119204
119205
119206
119207
119208
119209
# File 'ext/quickfix/QuickfixRuby.cpp', line 119177

SWIGINTERN VALUE
_wrap_PostgreSQLConnection_reconnect(int argc, VALUE *argv, VALUE self) {
  FIX::PostgreSQLConnection *arg1 = (FIX::PostgreSQLConnection *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FIX__PostgreSQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::PostgreSQLConnection *","reconnect", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::PostgreSQLConnection * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (bool)(arg1)->reconnect();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}