NCBI C++ ToolKit
dbapi_testspeed.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: dbapi_testspeed.cpp 70295 2015-12-17 18:38:53Z ucko $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * File Description:
27 * Run a series of insert/update/select statement,
28 * measure the time required for their execution.
29 *
30 *============================================================================
31 */
32 
33 #include <ncbi_pch.hpp>
34 #include <corelib/ncbitime.hpp>
35 #include <corelib/ncbifile.hpp>
36 #include "dbapi_testspeed.hpp"
37 #include "../dbapi_sample_base.hpp"
38 #include <common/test_assert.h> /* This header must go last */
39 
41 
42 /////////////////////////////////////////////////////////////////////////////
43 // CDbapiTestBcpApp::
44 //
45 
47 {
48 public:
49  CDbapiTestSpeedApp(void);
50  virtual ~CDbapiTestSpeedApp(void);
51 
52 protected:
53  virtual void InitSample(CArgDescriptions& arg_desc);
54  virtual int RunSample(void);
55 
56 protected:
57  ///
58  void FetchFile (const string& table_name, bool readItems);
59  ///
60  void FetchResults (const string& table_name, bool readItems);
61  string GetTableName(void) const;
62 
63 private:
64  string m_TableName;
65 };
66 
68 {
69 }
70 
72 {
73 }
74 
75 inline
76 string
78 {
79  return m_TableName;
80 }
81 
82 // const char usage[] =
83 // "Run a series of BCP/insert/select commands,\n"
84 // "measure the time required for their execution. \n"
85 // "\n"
86 // "USAGE: dbapi_testspeed -parameters [file]\n"
87 // "REQUIRED PARAMETERS:\n"
88 // " -S server\n"
89 // " -d driver (e.g. ctlib dblib ftds odbc gateway)\n"
90 // " -g sss_server:port for gateway database driver\n"
91 // " (only one of -d/-g is required to be present)\n"
92 // "OPTIONAL PARAMETERS:\n"
93 // " -r row_count (default is 1)\n"
94 // " -b text_blob_size in kilobytes (default is 1 kb)\n"
95 // " -c column_count 1..5 (int_val fl_val date_val str_val txt_val)\n"
96 // " -t table_name (default is 'TestSpeed')\n"
97 // " -m mode_character:\n"
98 // " r write and read as usual,\n"
99 // " use CDB_Result->ReadItem() instead of GetItem() whenever possible\n"
100 // " w write to the table, do not read, do not delete it\n"
101 // " R read using ReadItem() (can be done many times after '-m w' )\n"
102 // " G read using GetItem() (can be done many times after '-m w' )\n"
103 // "FILE (optional):\n"
104 // " Upload the specified file as a blob into the table,\n"
105 // " then download it to \"./testspeed.out\".\n"
106 // " \"diff\" can then be used to verify the data.\n"
107 // " -r -b -c parameterss are ignored.\n"
108 // "\n"
109 // ;
110 
111 void
113 {
114  arg_desc.AddOptionalKey(
115  "g", "sss_server",
116  "Server:port for gateway database driver\n"
117  "(only one of -d/-g is required to be present)",
119  );
120 
121  arg_desc.AddDefaultKey(
122  "r", "row_count",
123  "Row count",
125  "1"
126  );
127 
128  arg_desc.AddDefaultKey(
129  "b", "text_blob_size",
130  "Text blob size in kilobytes",
132  "1"
133  );
134 
135  arg_desc.AddOptionalKey(
136  "c", "column_count",
137  "Column count 1..5 (int_val fl_val date_val str_val txt_val)",
139  );
140 
141  arg_desc.AddDefaultKey(
142  "t", "table_name",
143  "Table name",
145  "#spd"
146  );
147 
148  arg_desc.AddOptionalKey(
149  "m", "mode_character",
150  "Mode character \n"
151  " r write and read as usual,\n"
152  " use CDB_Result->ReadItem() instead of GetItem() whenever possible\n"
153  " w write to the table, do not read, do not delete it\n"
154  " R read using ReadItem() (can be done many times after '-m w' )\n"
155  " G read using GetItem() (can be done many times after '-m w' )",
157  );
158  arg_desc.SetConstraint("m", new CArgAllow_Symbols("rwRG"));
159 
160  arg_desc.AddOptionalKey(
161  "FILE", "mode_character",
162  "Upload the specified file as a blob into the table,\n"
163  "then download it to \"./testspeed.out\" \n"
164  "\"diff\" can then be used to verify the data.\n"
165  "-r -b -c parameterss are ignored.\n",
167  );
168 }
169 
170 // Create a table with 5 columns, fill it using BCP or insert commands(1),
171 // fetch results(2), delete the table. Execution time is measured for steps 1, 2.
172 int
174 {
175  string host_name;
176  string port_num;
177  int count = 0;
178  int row_count = 1;
179  int col_count = 5;
180  int blob_size = 1;
181  bool readItems = false;
182  bool writeOnly = false;
183  bool selectOnly = false;
184  string fileParam;
185  CStopWatch timer;
186  double timeElapsed;
187 
188  const CArgs& args = GetArgs();
189 
190  // Process additional arguments ...
191 
192  //
193  if (args["g"]) {
194  host_name = args["g"].AsString();
195 
196  SIZE_TYPE i = NStr::Find(host_name, ":");
197  if ( i > 0 ) {
198  port_num = host_name.substr( i + 1 );
199  host_name.resize(i);
200  }
201 
202  if ( GetDriverName().empty() ) {
203  SetDriverName("gateway");
204  }
205  }
206 
207  //
208  row_count = args["r"].AsInteger();
209  if ( row_count < 1 || row_count > 0x100000 ) {
210  cerr << "Error -- invalid row count; valid values are 1 .. 1 Meg.\n";
211  return 1;
212  }
213 
214  //
215  if (args["c"]) {
216  col_count = args["g"].AsInteger();
217  }
218 
219  //
220  blob_size = args["b"].AsInteger();
221  if ( blob_size < 1 || blob_size > 1024000 ) {
222  cerr << "Error -- invalid blob size; valid values are 1 (kb) to 1000 (kb)\n";
223  return 1;
224  }
225  if ( col_count < 5 ) {
226  cerr << "Error -- blob size makes sense for '-c 5' only.\n";
227  return 1;
228  }
229 
230  //
231  m_TableName = args["t"].AsString();
232 
233  //
234  if (args["m"]) {
235  string key_value = args["m"].AsString();
236 
237  switch ( key_value[0] ) {
238  case 'r':
239  readItems = true;
240  break;
241  case 'w':
242  writeOnly = true;
243  break;
244  case 'G':
245  selectOnly = true;
246  break;
247  case 'R':
248  selectOnly = true;
249  readItems = true;
250  break;
251  default:
252  cerr << "Error -- invalid mode character '" << key_value << "'\n";
253  return 1;
254  }
255  }
256 
257  //
258  if (args["FILE"]) {
259  fileParam = args["FILE"].AsString();
260  }
261 
262  // Modify connection atributes
263  // Do it before establishing of a connection to a server ...
264  if ( !host_name.empty() ) {
265  SetDatabaseParameter("host", host_name);
266  }
267  if ( !port_num.empty() ) {
268  SetDatabaseParameter("port", port_num);
269  }
270 
271  try {
272  auto_ptr<CDB_LangCmd> set_cmd;
273  auto_ptr<CDB_LangCmd> ins_cmd;
275 
276  string cmd_str("set textsize 1024000");
277  set_cmd.reset(GetConnection().LangCmd(cmd_str));
278  set_cmd->Send();
279  while ( set_cmd->HasMoreResults() ) {
280  auto_ptr<CDB_Result> r(set_cmd->Result());
281  }
282 
283  // Create table, insert data
284  if ( !selectOnly ) {
285  // Deletes the pre-existing table, if present
287  cout << ", rows " << row_count;
288  cout << ", cols " << col_count;
289  cout << ", blob size " << blob_size << "\n";
290 
291  if ( col_count > 4 ) {
292  // "Bulk copy in" command
293  bcp.reset(GetConnection().BCPIn(GetTableName()));
294  } else {
295  string s = "insert into ";
296  s += GetTableName();
297  s += " (int_val";
298  string sv = "@i";
299 
300  if ( col_count > 1 ) {
301  s += ", fl_val";
302  sv +=", @f";
303  }
304  if ( col_count > 2 ) {
305  s += ", date_val";
306  sv += ", @d";
307  }
308  if ( col_count > 3 ) {
309  s += ", str_val";
310  sv +=", @s";
311  }
312 
313  s += ") values (";
314  s += sv;
315  s += ")";
316 
317  ins_cmd.reset(GetConnection().LangCmd(s));
318  }
319 
320  CDB_Int int_val;
321  CDB_Float fl_val;
322  CDB_DateTime date_val(CTime::eCurrent);
323  CDB_VarChar str_val;
324  CDB_Text pTxt;
325  int i;
326 
327  if ( !fileParam.empty() ) {
328  CNcbiIfstream f(fileParam.c_str(), IOS_BASE::in |
329  IOS_BASE::binary);
330  if ( !f.is_open() ) {
331  cerr << "Error -- cannot read '" << fileParam << "'\n";
332  return 1;
333  }
334  char buf[10240];
335  size_t sz;
336  while ( f.good() && !f.eof() ) {
337  f.read( buf, sizeof(buf) );
338  sz = (size_t)f.gcount();
339  if ( sz == 0 ) break;
340  pTxt.Append(buf, sz);
341  if ( sz != sizeof(buf) ) break;
342  }
343  f.close();
344 
345  col_count = 5;
346  row_count = 1;
347  } else if ( col_count > 4 ) {
348  for ( i = 0; i < blob_size; ++i ) {
349  // Add 1024 chars
350  for ( int j = 0; j < 32; ++j ) {
351  pTxt.Append("If you want to know who we are--");
352  }
353  }
354  }
355 
356  timer.Start();
357 
358  // Bind program variables as data source
359  if ( bcp.get() ) {
360  bcp->Bind(0, &int_val);
361  if ( col_count > 1 ) bcp->Bind(1, &fl_val );
362  if ( col_count > 2 ) bcp->Bind(2, &date_val);
363  if ( col_count > 3 ) bcp->Bind(3, &str_val );
364  if ( col_count > 4 ) bcp->Bind(4, &pTxt );
365  } else {
366  if ( !ins_cmd->BindParam("@i", &int_val) ) {
367  cerr << "Error in BindParam()\n";
369  return 1;
370  }
371 
372  if ( col_count > 1 ) ins_cmd->BindParam("@f", &fl_val );
373  if ( col_count > 2 ) ins_cmd->BindParam("@d", &date_val );
374  if ( col_count > 3 ) ins_cmd->BindParam("@s", &str_val );
375  }
376 
377  for ( i = 0; i < row_count; ++i ) {
378  int_val = i;
379  fl_val = static_cast<float>(i + 0.999);
380  if ( !fileParam.empty() ) {
381  CDirEntry fileEntry(fileParam);
382  CTime fileTime;
383  fileEntry.GetTime(&fileTime);
384 
385  date_val = fileTime;
386  str_val = fileParam;
387  } else {
388  date_val = date_val.Value();
389  str_val = string("Franz Joseph Haydn symphony # ") +
391  }
392  pTxt.MoveTo(0);
393 
394  if ( bcp.get() ) {
395  bcp->SendRow();
396 
397  if ( count == 2 ) {
398  bcp->CompleteBatch();
399  count = 0;
400  }
401  ++count;
402  } else {
403  ins_cmd->Send();
404  while ( ins_cmd->HasMoreResults() ) {
405  auto_ptr<CDB_Result> r(ins_cmd->Result());
406  }
407  }
408  }
409  if ( bcp.get() ) {
410  bcp->CompleteBCP();
411  }
412  timeElapsed = timer.Elapsed();
413  cout << "inserting timeElapsed=" << NStr::DoubleToString(timeElapsed, 2) << "\n";
414  } else {
415  cout << "\n";
416  }
417 
418  if ( !writeOnly ) {
419  // Read data
420  timer.Start();
421  if ( !fileParam.empty() ) {
422  FetchFile(GetTableName(), readItems);
423  } else {
424  FetchResults(GetTableName(), readItems);
425  }
426  timeElapsed = timer.Elapsed();
427  cout << "fetching timeElapsed=" << NStr::DoubleToString(timeElapsed,2) << "\n";
428  cout << "\n";
429  }
430 
431  if ( !(selectOnly || writeOnly) ) {
433  }
434 
435  // Drop lost tables.
437  }
438  catch ( CDB_Exception& e ) {
440  return 1;
441  }
442 
443  return 0;
444 }
445 
446 void
447 CDbapiTestSpeedApp::FetchFile(const string& table_name, bool readItems)
448 {
449  CDB_VarChar str_val;
450  CDB_DateTime date_val;
451 
452  string query = "select date_val,str_val,txt_val from ";
453  query += table_name;
454  auto_ptr<CDB_LangCmd> lcmd(GetConnection().LangCmd(query));
455  lcmd->Send();
456 
457  //CTime fileTime;
458  while ( lcmd->HasMoreResults() ) {
459  auto_ptr<CDB_Result> r(lcmd->Result());
460  if ( !r.get() ) continue;
461 
462  if ( r->ResultType() == eDB_RowResult ) {
463  while ( r->Fetch() ) {
464  CNcbiOfstream f("testspeed.out", IOS_BASE::trunc|IOS_BASE::out|IOS_BASE::binary);
465 
466  for ( unsigned int j = 0; j < r->NofItems(); j++ ) {
467  EDB_Type rt = r->ItemDataType(j);
468 
469  if ( readItems && rt == eDB_Text ) {
470  bool isNull=false;
471  char txt_buf[10240];
472  // cout<< "j=" << j
473  // << " CurrentItemNo()=" << r->CurrentItemNo() << "\n";
474  for ( ;; ) {
475  size_t len_txt = r->ReadItem
476  (txt_buf, sizeof(txt_buf), &isNull);
477  //cout << "len_txt=" << len_txt << " isNull=" << isNull << "\n";
478  if ( isNull || len_txt<=0 ) break;
479  f.write(txt_buf, len_txt);
480  }
481  f.close();
482  continue;
483  }
484 
485  // Type-specific GetItem()
486  if ( rt == eDB_Char || rt == eDB_VarChar ) {
487  r->GetItem(&str_val);
488 
489  } else if ( rt == eDB_DateTime || rt == eDB_SmallDateTime ) {
490  r->GetItem(&date_val);
491  } else if ( rt == eDB_Text ) {
492  CDB_Text text_val;
493  r->GetItem(&text_val);
494 
495  if ( text_val.IsNULL() ) {
496  // cout << "{NULL}";
497  } else {
498  char txt_buf[10240];
499  //cout << "text_val.Size()=" << text_val.Size() << "\n";
500  for ( ;; ) {
501  size_t len_txt
502  = text_val.Read(txt_buf, sizeof(txt_buf));
503  if (len_txt == 0) break;
504  f.write(txt_buf, len_txt);
505  }
506  }
507  f.close();
508  } else {
509  r->SkipItem();
510  // cout << "{unprintable}";
511  }
512  }
513  // cout << "</ROW>" << endl << endl;
514  }
515  }
516  }
517 
518  cout << "File " << str_val.AsString() << " dated "
519  << date_val.Value().AsString() << " was written to testspeed.out using "
520  << (readItems?"ReadItem":"GetItem") << "\n";
521 }
522 
523 void
524 CDbapiTestSpeedApp::FetchResults (const string& table_name, bool readItems)
525 {
526  // char* txt_buf = NULL ; // Temporary disabled ...
527  // long len_txt = 0;
528 
529 
530  string query = "select int_val,fl_val,date_val,str_val,txt_val from ";
531  query += table_name;
532 
533  auto_ptr<CDB_LangCmd> lcmd(GetConnection().LangCmd(query));
534  lcmd->Send();
535 
536  while ( lcmd->HasMoreResults() ) {
537  auto_ptr<CDB_Result> r(lcmd->Result());
538  if ( !r.get() ) continue;
539 
540  if ( r->ResultType() == eDB_RowResult ) {
541  while ( r->Fetch() ) {
542  // cout << "<ROW>"<< endl;
543  for ( unsigned int j = 0; j < r->NofItems(); ++j ) {
544  // Determination of data type:
545  EDB_Type rt = r->ItemDataType(j);
546  const string iname = r->ItemName(j);
547 
548  // cout << iname << '=';
549 
550  if ( readItems && rt!=eDB_Numeric &&
551  rt != eDB_DateTime && rt != eDB_SmallDateTime ) {
552  bool isNull;
553  char buf[1024];
554  size_t sz=0;
555  while ( j == (unsigned int) r->CurrentItemNo() ) {
556  sz += r->ReadItem(buf, sizeof(buf), &isNull);
557  }
558  continue;
559  }
560 
561  // Type-specific GetItem()
562  if ( rt == eDB_Char || rt == eDB_VarChar ) {
563  CDB_VarChar str_val;
564  r->GetItem(&str_val);
565  // cout << (str_val.IsNULL()? "{NULL}" : str_val.Value()) << endl << endl ;
566 
567  } else if ( rt == eDB_Int || rt == eDB_SmallInt || rt == eDB_TinyInt ) {
568  CDB_Int int_val;
569  r->GetItem(&int_val);
570  if ( int_val.IsNULL() ) {
571  // cout << "{NULL}";
572  } else {
573  // cout << int_val.Value() << endl << endl ;
574  }
575  } else if ( rt == eDB_Float ) {
576  CDB_Float fl_val;
577  r->GetItem(&fl_val);
578  if ( fl_val.IsNULL() ) {
579  // cout << "{NULL}";
580  } else {
581  // cout << fl_val.Value() << endl<< endl ;
582  }
583  } else if ( rt == eDB_Double ) {
584  CDB_Double fl_val;
585  r->GetItem(&fl_val);
586  if ( fl_val.IsNULL() ) {
587  // cout << "{NULL}";
588  } else {
589  // cout << fl_val.Value() << endl<< endl ;
590  }
591  } else if ( rt == eDB_DateTime || rt == eDB_SmallDateTime ) {
592  CDB_DateTime date_val;
593  r->GetItem(&date_val);
594  if ( date_val.IsNULL() ) {
595  // cout << "{NULL}";
596  } else {
597  // cout << date_val.Value().AsString() << endl<< endl ;
598  }
599  } else if ( rt == eDB_Text ) {
600  CDB_Text text_val;
601  r->GetItem(&text_val);
602 
603  if ( text_val.IsNULL() ) {
604  // cout << "{NULL}";
605  } else {
606  /* Do not do this at the moment ...
607  txt_buf = ( char*) malloc (text_val.Size() + 1);
608  len_txt = text_val.Read (( char*)txt_buf, text_val.Size());
609  txt_buf[text_val.Size()] = '\0';
610  */
611  // cout << txt_buf << endl<< endl ;
612  }
613  } else {
614  r->SkipItem();
615  // cout << "{unprintable}";
616  }
617  }
618  // cout << "</ROW>" << endl << endl;
619  }
620  }
621  }
622 }
623 
624 int main(int argc, char* argv[])
625 {
626  // Execute main application function
627  return CDbapiTestSpeedApp().AppMain(argc, argv);
628 }
629 
630 
virtual bool SendRow()
Send row to the server.
Definition: public.cpp:960
USING_NCBI_SCOPE
CStopWatch –.
Definition: ncbitime.hpp:1891
void CreateTable(const string &table_name)
function CreateTable is creating table in the database
char * buf
bool IsNULL() const
Definition: types.hpp:302
void Start(void)
Start the timer.
Definition: ncbitime.hpp:2719
static int trunc
Definition: array_out.c:11
void AddDefaultKey(const string &name, const string &synopsis, const string &comment, EType type, const string &default_value, TFlags flags=0, const string &env_var=kEmptyStr, const char *display_value=nullptr)
Add description for optional key with default value.
Definition: ncbiargs.cpp:2256
string GetTableName(void) const
virtual bool CompleteBCP()
Complete the BCP and store all rows transferred in last batch into the table.
Definition: public.cpp:985
std::ofstream out("events_result.xml")
main entry point for tests
void SetDriverName(const string &name)
Set driver name.
int main(int argc, char *argv[])
Name of file (must exist and be readable)
Definition: ncbiargs.hpp:568
CDirEntry –.
Definition: ncbifile.hpp:263
string
Definition: cgiapp.hpp:498
X * get(void) const
Get pointer value.
Definition: ncbimisc.hpp:397
static CDB_UserHandler & GetDefault(void)
Definition: exception.cpp:619
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
Definition: ncbiapp.cpp:610
void DeleteLostTables(void)
Delete tables which are lost after previous tests.
void SetDatabaseParameter(const string &name, const string &value)
Set database connection parameter.
int i
const string & AsString(void) const
Definition: types.hpp:515
Defines: CTimeFormat - storage class for time format.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5195
virtual bool HandleIt(CDB_Exception *ex)=0
Handle the exceptions resulting from a native API call, one-by-one.
Convertible into an integer number (int or Int8)
Definition: ncbiargs.hpp:566
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
Definition: ncbistr.cpp:2786
const string & GetDriverName(void) const
Return current driver name.
static string query
virtual bool HasMoreResults() const
Definition: public.cpp:768
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
void reset(X *p=0)
Reset pointer.
Definition: ncbimisc.hpp:405
void SetConstraint(const string &name, const CArgAllow *constraint, EConstraintNegate negate=eConstraint)
Set additional user defined constraint on argument value.
Definition: ncbiargs.cpp:2404
virtual bool MoveTo(size_t byte_number)
Definition: types.cpp:2006
string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const
Transform time to string.
Definition: ncbitime.cpp:1515
const CTime & Value(void) const
Definition: types.cpp:2486
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
Definition: ncbiapp.cpp:189
void DeleteTable(const string &table_name)
EDB_Type
Definition: types.hpp:52
CDB_Connection & GetConnection(void)
Get connection created using server, username and password specified in the application command line...
CTime –.
Definition: ncbitime.hpp:290
CArgDescriptions –.
Definition: ncbiargs.hpp:514
CDB_Exception –.
Definition: exception.hpp:116
An arbitrary string.
Definition: ncbiargs.hpp:563
virtual void InitSample(CArgDescriptions &arg_desc)
Override these 3 to suit your test's needs.
bool GetTime(CTime *modification, CTime *last_access=0, CTime *creation=0) const
Get time stamp(s) of a directory entry.
Definition: ncbifile.cpp:1835
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock, CFileIO, CFileReader, CFileWriter, CFileReaderWriter, CFileException.
CArgs –.
Definition: ncbiargs.hpp:356
virtual int RunSample(void)
void FetchResults(const string &table_name, bool readItems)
bool BindParam(const string &name, CDB_Object *value)
Definition: public.hpp:578
virtual size_t Read(void *buff, size_t nof_bytes)
Definition: types.cpp:1985
virtual bool Send()
Send command to the server.
Definition: public.cpp:736
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
Definition: ncbitime.hpp:2730
void FetchFile(const string &table_name, bool readItems)
virtual size_t Append(const void *buff, size_t nof_bytes)
Definition: types.cpp:2197
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:129
static const char table_name[]
Definition: utf8.c:39
Use current time.
Definition: ncbitime.hpp:295
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
Definition: ncbistre.hpp:253
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
Definition: ncbistr.hpp:5298
virtual CDB_Result * Result()
Get result set.
Definition: public.cpp:762
virtual ~CDbapiTestSpeedApp(void)
void AddOptionalKey(const string &name, const string &synopsis, const string &comment, EType type, TFlags flags=0)
Add description for optional key without default value.
Definition: ncbiargs.cpp:2241
std::istream & in(std::istream &in_, double &x_)
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
Definition: ncbistre.hpp:326
virtual bool CompleteBatch()
Complete batch – to store all rows transferred by far in this batch into the table.
Definition: public.cpp:976
CArgAllow_Symbols –.
Definition: ncbiargs.hpp:1464
bool Bind(unsigned int column_num, CDB_Object *value)
Definition: public.cpp:953
Modified on Wed Apr 26 17:46:39 2017 by modify_doxy.py rev. 533848