Class: Quickfix::MySQLQuery

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



115276
115277
115278
115279
115280
115281
115282
115283
115284
115285
115286
115287
115288
115289
115290
115291
115292
115293
115294
115295
115296
115297
115298
115299
115300
115301
115302
115303
115304
115305
115306
115307
115308
115309
115310
115311
115312
115313
115314
115315
115316
115317
115318
115319
115320
115321
115322
# File 'ext/quickfix/QuickfixRuby.cpp', line 115276

SWIGINTERN VALUE
_wrap_new_MySQLQuery(int argc, VALUE *argv, VALUE self) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  const char *classname SWIGUNUSED = "Quickfix::MySQLQuery";
  FIX::MySQLQuery *result = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","MySQLQuery", 1, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","MySQLQuery", 1, argv[0])); 
    }
    arg1 = ptr;
  }
  {
    if(tryRubyException([&]() mutable 
        {
      result = (FIX::MySQLQuery *)new FIX::MySQLQuery((std::string const &)*arg1);
          DATA_PTR(self) = result;
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  {
    if( std::string("std::string const &") == "std::string &" )    
    {
      rb_str_resize( argv[0], 0 );
      rb_str_append( argv[0], rb_str_new2(arg1->c_str()) );
    }
  }
  if (SWIG_IsNewObj(res1)) delete arg1;
  return self;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return Qnil;
}

Instance Method Details

#execute(*args) ⇒ Object



115331
115332
115333
115334
115335
115336
115337
115338
115339
115340
115341
115342
115343
115344
115345
115346
115347
115348
115349
115350
115351
115352
115353
115354
115355
115356
115357
115358
115359
115360
115361
115362
115363
115364
115365
115366
115367
115368
115369
115370
115371
# File 'ext/quickfix/QuickfixRuby.cpp', line 115331

SWIGINTERN VALUE
_wrap_MySQLQuery_execute(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLQuery *arg1 = (FIX::MySQLQuery *) 0 ;
  MYSQL *arg2 = (MYSQL *) 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__MySQLQuery, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLQuery *","execute", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLQuery * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_MYSQL, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "MYSQL *","execute", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< MYSQL * >(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;
}

#getValue(*args) ⇒ Object



115479
115480
115481
115482
115483
115484
115485
115486
115487
115488
115489
115490
115491
115492
115493
115494
115495
115496
115497
115498
115499
115500
115501
115502
115503
115504
115505
115506
115507
115508
115509
115510
115511
115512
115513
115514
115515
115516
115517
115518
115519
115520
115521
115522
115523
115524
115525
115526
115527
# File 'ext/quickfix/QuickfixRuby.cpp', line 115479

SWIGINTERN VALUE
_wrap_MySQLQuery_getValue(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLQuery *arg1 = (FIX::MySQLQuery *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FIX__MySQLQuery, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLQuery *","getValue", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLQuery * >(argp1);
  ecode2 = SWIG_AsVal_int(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","getValue", 2, argv[0] ));
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","getValue", 3, argv[1] ));
  } 
  arg3 = static_cast< int >(val3);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (char *)(arg1)->getValue(arg2,arg3);
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}

#reason(*args) ⇒ Object



115444
115445
115446
115447
115448
115449
115450
115451
115452
115453
115454
115455
115456
115457
115458
115459
115460
115461
115462
115463
115464
115465
115466
115467
115468
115469
115470
115471
115472
115473
115474
115475
115476
# File 'ext/quickfix/QuickfixRuby.cpp', line 115444

SWIGINTERN VALUE
_wrap_MySQLQuery_reason(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLQuery *arg1 = (FIX::MySQLQuery *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string *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__MySQLQuery, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLQuery *","reason", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLQuery * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (std::string *) &(arg1)->reason();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_From_std_string(static_cast< std::string >(*result));
  return vresult;
fail:
  return Qnil;
}

#rows(*args) ⇒ Object



115409
115410
115411
115412
115413
115414
115415
115416
115417
115418
115419
115420
115421
115422
115423
115424
115425
115426
115427
115428
115429
115430
115431
115432
115433
115434
115435
115436
115437
115438
115439
115440
115441
# File 'ext/quickfix/QuickfixRuby.cpp', line 115409

SWIGINTERN VALUE
_wrap_MySQLQuery_rows(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLQuery *arg1 = (FIX::MySQLQuery *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int 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__MySQLQuery, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLQuery *","rows", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLQuery * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (int)(arg1)->rows();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}

#success(*args) ⇒ Object



115374
115375
115376
115377
115378
115379
115380
115381
115382
115383
115384
115385
115386
115387
115388
115389
115390
115391
115392
115393
115394
115395
115396
115397
115398
115399
115400
115401
115402
115403
115404
115405
115406
# File 'ext/quickfix/QuickfixRuby.cpp', line 115374

SWIGINTERN VALUE
_wrap_MySQLQuery_success(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLQuery *arg1 = (FIX::MySQLQuery *) 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__MySQLQuery, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLQuery *","success", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLQuery * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      result = (bool)(arg1)->success();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#throwException(*args) ⇒ Object



115530
115531
115532
115533
115534
115535
115536
115537
115538
115539
115540
115541
115542
115543
115544
115545
115546
115547
115548
115549
115550
115551
115552
115553
115554
115555
115556
115557
115558
115559
# File 'ext/quickfix/QuickfixRuby.cpp', line 115530

SWIGINTERN VALUE
_wrap_MySQLQuery_throwException(int argc, VALUE *argv, VALUE self) {
  FIX::MySQLQuery *arg1 = (FIX::MySQLQuery *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  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__MySQLQuery, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::MySQLQuery *","throwException", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::MySQLQuery * >(argp1);
  {
    if(tryRubyException([&]() mutable 
        {
      (arg1)->throwException();
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  return Qnil;
fail:
  return Qnil;
}