Class: Quickfix::MySQLConnection

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

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object



115740
115741
115742
115743
115744
115745
115746
115747
115748
115749
115750
115751
115752
115753
115754
115755
115756
115757
115758
115759
115760
115761
115762
115763
115764
115765
115766
115767
115768
115769
115770
115771
115772
115773
115774
115775
115776
115777
115778
115779
115780
115781
115782
115783
115784
115785
115786
115787
115788
115789
115790
115791
115792
# File 'ext/quickfix/QuickfixRuby.cpp', line 115740

SWIGINTERN VALUE _wrap_new_MySQLConnection(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_MySQLConnection__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_MySQLConnection__SWIG_1(nargs, args, self);
            }
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "MySQLConnection.new", 
    "    MySQLConnection.new(FIX::DatabaseConnectionID const &id)\n"
    "    MySQLConnection.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



115836
115837
115838
115839
115840
115841
115842
115843
115844
115845
115846
115847
115848
115849
115850
115851
115852
115853
115854
115855
115856
115857
115858
115859
115860
115861
115862
115863
115864
115865
115866
115867
115868
# File 'ext/quickfix/QuickfixRuby.cpp', line 115836

SWIGINTERN VALUE
_wrap_MySQLConnection_connected(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLConnection *arg1 = (FIX::MySQLConnection *) 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__MySQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLConnection *","connected", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLConnection * >(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



115801
115802
115803
115804
115805
115806
115807
115808
115809
115810
115811
115812
115813
115814
115815
115816
115817
115818
115819
115820
115821
115822
115823
115824
115825
115826
115827
115828
115829
115830
115831
115832
115833
# File 'ext/quickfix/QuickfixRuby.cpp', line 115801

SWIGINTERN VALUE
_wrap_MySQLConnection_connectionID(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLConnection *arg1 = (FIX::MySQLConnection *) 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__MySQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLConnection *","connectionID", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLConnection * >(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



115906
115907
115908
115909
115910
115911
115912
115913
115914
115915
115916
115917
115918
115919
115920
115921
115922
115923
115924
115925
115926
115927
115928
115929
115930
115931
115932
115933
115934
115935
115936
115937
115938
115939
115940
115941
115942
115943
115944
115945
115946
115947
115948
115949
# File 'ext/quickfix/QuickfixRuby.cpp', line 115906

SWIGINTERN VALUE
_wrap_MySQLConnection_execute(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLConnection *arg1 = (FIX::MySQLConnection *) 0 ;
  FIX::MySQLQuery *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__MySQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLConnection *","execute", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLConnection * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FIX__MySQLQuery,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FIX::MySQLQuery &","execute", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FIX::MySQLQuery &","execute", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FIX::MySQLQuery * >(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



115871
115872
115873
115874
115875
115876
115877
115878
115879
115880
115881
115882
115883
115884
115885
115886
115887
115888
115889
115890
115891
115892
115893
115894
115895
115896
115897
115898
115899
115900
115901
115902
115903
# File 'ext/quickfix/QuickfixRuby.cpp', line 115871

SWIGINTERN VALUE
_wrap_MySQLConnection_reconnect(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLConnection *arg1 = (FIX::MySQLConnection *) 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__MySQLConnection, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLConnection *","reconnect", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLConnection * >(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;
}