File: classmysqlpp_1_1Connection.html

package info (click to toggle)
mysql%2B%2B 3.0.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 10,328 kB
  • ctags: 9,487
  • sloc: cpp: 33,486; sh: 3,091; perl: 809; makefile: 683
file content (774 lines) | stat: -rw-r--r-- 47,118 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>MySQL++ Reference Manual</title>
	<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
	<link href="refman.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<b>mysqlpp</b>::<a class="el" href="classmysqlpp_1_1Connection.html">Connection</a></div>
<h1>mysqlpp::Connection Class Reference</h1><!-- doxytag: class="mysqlpp::Connection" --><!-- doxytag: inherits="mysqlpp::OptionalExceptions" -->Manages the connection to the database server.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="connection_8h-source.html">connection.h</a>&gt;</code>
<p>
Inheritance diagram for mysqlpp::Connection:<p><center><img src="classmysqlpp_1_1Connection__inherit__graph.png" border="0" usemap="#mysqlpp_1_1Connection__inherit__map" alt="Inheritance graph"></center>
<map name="mysqlpp_1_1Connection__inherit__map">
<area href="classmysqlpp_1_1TCPConnection.html" shape="rect" coords="5,156,189,180" alt="">
<area href="classmysqlpp_1_1UnixDomainSocketConnection.html" shape="rect" coords="213,156,499,180" alt="">
<area href="classmysqlpp_1_1WindowsNamedPipeConnection.html" shape="rect" coords="523,156,816,180" alt="">
<area href="classmysqlpp_1_1OptionalExceptions.html" shape="rect" coords="249,7,463,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for mysqlpp::Connection:<p><center><img src="classmysqlpp_1_1Connection__coll__graph.png" border="0" usemap="#mysqlpp_1_1Connection__coll__map" alt="Collaboration graph"></center>
<map name="mysqlpp_1_1Connection__coll__map">
<area href="classmysqlpp_1_1OptionalExceptions.html" shape="rect" coords="5,7,219,31" alt="">
<area href="classmysqlpp_1_1DBDriver.html" shape="rect" coords="333,7,480,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classmysqlpp_1_1Connection-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#0053ef79210079a5579e55a12fe5f10a">Connection</a> (bool te=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create object without connecting to the database server.  <a href="#0053ef79210079a5579e55a12fe5f10a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#382ec4947dbb1998833ad0fc6f93d1c9">Connection</a> (const char *db, const char *server=0, const char *user=0, const char *password=0, unsigned int port=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create object and connect to database server in one step.  <a href="#382ec4947dbb1998833ad0fc6f93d1c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#23e80d1b3fee58e8771b2a6dd3c9ac3f">Connection</a> (const <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Establish a new connection using the same parameters as an existing connection.  <a href="#23e80d1b3fee58e8771b2a6dd3c9ac3f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8eda1910b116f1ccdc1a86711ca6f660"></a><!-- doxytag: member="mysqlpp::Connection::~Connection" ref="8eda1910b116f1ccdc1a86711ca6f660" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#8eda1910b116f1ccdc1a86711ca6f660">~Connection</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c878756f63bcd0ffe47ea18f7799429e"></a><!-- doxytag: member="mysqlpp::Connection::client_version" ref="c878756f63bcd0ffe47ea18f7799429e" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#c878756f63bcd0ffe47ea18f7799429e">client_version</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get version of library underpinning the current database driver. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#a8e2b54058f7ff7c480e34129a8ee212">connect</a> (const char *db=0, const char *server=0, const char *user=0, const char *password=0, unsigned int port=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connect to database after object is created.  <a href="#a8e2b54058f7ff7c480e34129a8ee212"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#65085de08d705e8b90bfc310cd77b125">connected</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if connection was established successfully.  <a href="#65085de08d705e8b90bfc310cd77b125"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ulonglong&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#71356d1ca53c988bf9f1e1946e4a7f48">count_rows</a> (const std::string &amp;table)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of rows in a table.  <a href="#71356d1ca53c988bf9f1e1946e4a7f48"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#c9852fb87572c6f10c6de051bacf6b8d">create_db</a> (const std::string &amp;db)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ask the database server to create a database.  <a href="#c9852fb87572c6f10c6de051bacf6b8d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61e571ee724d79c455555f62472880ef"></a><!-- doxytag: member="mysqlpp::Connection::disconnect" ref="61e571ee724d79c455555f62472880ef" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#61e571ee724d79c455555f62472880ef">disconnect</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Drop the connection to the database server. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d118df40a7bd4bb63e7286b221f7680"></a><!-- doxytag: member="mysqlpp::Connection::driver" ref="0d118df40a7bd4bb63e7286b221f7680" args="()" -->
<a class="el" href="classmysqlpp_1_1DBDriver.html">DBDriver</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#0d118df40a7bd4bb63e7286b221f7680">driver</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a reference to the current database driver. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#a073e784a16a9d4b357740a626a6b2e1">drop_db</a> (const std::string &amp;db)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Asks the database server to drop (destroy) a database.  <a href="#a073e784a16a9d4b357740a626a6b2e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3cb1bf601b19dbb87b36bed4590f4214"></a><!-- doxytag: member="mysqlpp::Connection::errnum" ref="3cb1bf601b19dbb87b36bed4590f4214" args="()" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#3cb1bf601b19dbb87b36bed4590f4214">errnum</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return last error number associated with this connection. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#73c67c9a4d4c77fcf2c7a98555542c8a">error</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return error message for last error associated with this connection.  <a href="#73c67c9a4d4c77fcf2c7a98555542c8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#2a047f5c6028d5fb95fad9d8062f2e87">ipc_info</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get information about the IPC connection to the database server.  <a href="#2a047f5c6028d5fb95fad9d8062f2e87"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#4964b1400101fc0e812d342c12599e42">kill</a> (unsigned long tid) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Kill a database server thread.  <a href="#4964b1400101fc0e812d342c12599e42"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#a63bfef0bee8b3f94a8d33e52e374f40">operator private_bool_type</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test whether any error has occurred within the object.  <a href="#a63bfef0bee8b3f94a8d33e52e374f40"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af58375723c00a4ac494c83ab384596e"></a><!-- doxytag: member="mysqlpp::Connection::operator=" ref="af58375723c00a4ac494c83ab384596e" args="(const Connection &amp;rhs)" -->
<a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#af58375723c00a4ac494c83ab384596e">operator=</a> (const <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy an existing <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> object's state into this object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#c1dbc411f7ab1debbabe241561fe4091">ping</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">"Pings" the database server  <a href="#c1dbc411f7ab1debbabe241561fe4091"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9279771c37c14b02ac205d70e823dc67"></a><!-- doxytag: member="mysqlpp::Connection::protocol_version" ref="9279771c37c14b02ac205d70e823dc67" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#9279771c37c14b02ac205d70e823dc67">protocol_version</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns version number of the protocol the database driver uses to communicate with the server. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classmysqlpp_1_1Query.html">Query</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#6954d437d52004915fbc96a0be79ab37">query</a> (const char *qstr=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a new query object.  <a href="#6954d437d52004915fbc96a0be79ab37"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classmysqlpp_1_1Query.html">Query</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#f7aaad10bb2f08cae4384f5c227c0f19">query</a> (const std::string &amp;qstr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a new query object.  <a href="#f7aaad10bb2f08cae4384f5c227c0f19"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#f1bd6c380dea4cf157e4de7295550a0c">select_db</a> (const std::string &amp;db)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change to a different database managed by the database server we are connected to.  <a href="#f1bd6c380dea4cf157e4de7295550a0c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2569f5b2e8c645544e120ed205f09d5"></a><!-- doxytag: member="mysqlpp::Connection::server_version" ref="e2569f5b2e8c645544e120ed205f09d5" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#e2569f5b2e8c645544e120ed205f09d5">server_version</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the database server's version string. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#266f69b0e8d9d588e8cc6c5a2a897b87">set_option</a> (<a class="el" href="classmysqlpp_1_1Option.html">Option</a> *o)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a connection option.  <a href="#266f69b0e8d9d588e8cc6c5a2a897b87"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8fed0ebc10f72fe591941dc6f64b6f20"></a><!-- doxytag: member="mysqlpp::Connection::shutdown" ref="8fed0ebc10f72fe591941dc6f64b6f20" args="()" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#8fed0ebc10f72fe591941dc6f64b6f20">shutdown</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ask database server to shut down. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ef926417f221e8fb2d9d56806ebb5a10"></a><!-- doxytag: member="mysqlpp::Connection::server_status" ref="ef926417f221e8fb2d9d56806ebb5a10" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#ef926417f221e8fb2d9d56806ebb5a10">server_status</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns information about database server's status. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3efa036ce69ea78e242a2b3f9c12579"></a><!-- doxytag: member="mysqlpp::Connection::thread_aware" ref="f3efa036ce69ea78e242a2b3f9c12579" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#f3efa036ce69ea78e242a2b3f9c12579">thread_aware</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if both MySQL++ and database driver we're using were compiled with thread awareness. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="63d89963e63c74fe0dcb0eb00a5a8cbd"></a><!-- doxytag: member="mysqlpp::Connection::thread_end" ref="63d89963e63c74fe0dcb0eb00a5a8cbd" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#63d89963e63c74fe0dcb0eb00a5a8cbd">thread_end</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells the underlying database driver that this thread is done using the library. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#60c43e10eb9db82c075443add56785ce">thread_id</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the database server's thread ID for this connection.  <a href="#60c43e10eb9db82c075443add56785ce"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#ade1534fea22a5d1e2f315515f23f880">thread_start</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells the underlying database driver that the current thread is now using its services.  <a href="#ade1534fea22a5d1e2f315515f23f880"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3dcec3b1e9a1aa6efb287bc9ec11f7d5"></a><!-- doxytag: member="mysqlpp::Connection::build_error_message" ref="3dcec3b1e9a1aa6efb287bc9ec11f7d5" args="(const char *core)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#3dcec3b1e9a1aa6efb287bc9ec11f7d5">build_error_message</a> (const char *core)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build an error message in the standard form used whenever one of the methods can't succeed because we're not connected to the database server. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#44070d9f1bee49126320ad815a854ed3">copy</a> (const <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Establish a new connection as a copy of an existing one.  <a href="#44070d9f1bee49126320ad815a854ed3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9724a5edab5db2c7a71fdccfe124cb5"></a><!-- doxytag: member="mysqlpp::Connection::parse_ipc_method" ref="d9724a5edab5db2c7a71fdccfe124cb5" args="(const char *server, std::string &amp;host, unsigned int &amp;port, std::string &amp;socket_name)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#d9724a5edab5db2c7a71fdccfe124cb5">parse_ipc_method</a> (const char *server, std::string &amp;host, unsigned int &amp;port, std::string &amp;socket_name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extract elements from the server parameter in formats suitable for passing to <a class="el" href="classmysqlpp_1_1DBDriver.html#dbd9ba43e74fca9c46dbe85ea8657c0f">DBDriver::connect()</a>. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ffbdf4dd97aa66cfa592fc85938faf41"></a><!-- doxytag: member="mysqlpp::Connection::error_message_" ref="ffbdf4dd97aa66cfa592fc85938faf41" args="" -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Connection.html#ffbdf4dd97aa66cfa592fc85938faf41">error_message_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">MySQL++ specific error, if any. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Manages the connection to the database server. 
<p>
This class is a thick wrapper around <a class="el" href="classmysqlpp_1_1DBDriver.html">DBDriver</a>, adding high-level error handling, utility functions, and abstraction away from underlying C API details. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="0053ef79210079a5579e55a12fe5f10a"></a><!-- doxytag: member="mysqlpp::Connection::Connection" ref="0053ef79210079a5579e55a12fe5f10a" args="(bool te=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mysqlpp::Connection::Connection           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>te</em> = <code>true</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create object without connecting to the database server. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>te</em>&nbsp;</td><td>if true, exceptions are thrown on errors </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="382ec4947dbb1998833ad0fc6f93d1c9"></a><!-- doxytag: member="mysqlpp::Connection::Connection" ref="382ec4947dbb1998833ad0fc6f93d1c9" args="(const char *db, const char *server=0, const char *user=0, const char *password=0, unsigned int port=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mysqlpp::Connection::Connection           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>db</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>server</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>user</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>port</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create object and connect to database server in one step. 
<p>
This constructor allows you to most fully specify the options used when connecting to the database server.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>db</em>&nbsp;</td><td>name of database to select upon connection </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>server</em>&nbsp;</td><td>specifies the IPC method and parameters for contacting the server; see below for details </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user</em>&nbsp;</td><td>user name to log in under, or 0 to use the user name this program is running under </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>password to use when logging in </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>port</em>&nbsp;</td><td>TCP port number database server is listening on, or 0 to use default value; note that you may also give this as part of the <code>server</code> parameter</td></tr>
  </table>
</dl>
The server parameter can be any of several different forms:<p>
<ul>
<li><b>0</b>: Let the database driver decide how to connect; usually some sort of localhost IPC method.</li><li><b>"."</b>: On Windows, this means named pipes, if the server supports it</li><li><b>"/some/domain/socket/path"</b>: If the passed string doesn't match one of the previous alternatives and we're on a system that supports Unix domain sockets, MySQL++ will test it to see if it names one, and use it if we have permission.</li><li><b>"host.name.or.ip:port"</b>: If the previous test fails, or if the system doesn't support Unix domain sockets at all, it assumes the string is some kind of network address, optionally followed by a colon and port. The name can be in dotted quad form, a host name, or a domain name. The port can either be a TCP/IP port number or a symbolic service name. If a port or service name is given here and a nonzero value is passed for the <code>port</code> parameter, the latter takes precedence. </li></ul>

</div>
</div><p>
<a class="anchor" name="23e80d1b3fee58e8771b2a6dd3c9ac3f"></a><!-- doxytag: member="mysqlpp::Connection::Connection" ref="23e80d1b3fee58e8771b2a6dd3c9ac3f" args="(const Connection &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mysqlpp::Connection::Connection           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Establish a new connection using the same parameters as an existing connection. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>existing <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> object </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a8e2b54058f7ff7c480e34129a8ee212"></a><!-- doxytag: member="mysqlpp::Connection::connect" ref="a8e2b54058f7ff7c480e34129a8ee212" args="(const char *db=0, const char *server=0, const char *user=0, const char *password=0, unsigned int port=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::connect           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>db</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>server</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>user</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>port</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Connect to database after object is created. 
<p>
It's better to use the connect-on-create constructor if you can. See its documentation for the meaning of these parameters.<p>
If you call this method on an object that is already connected to a database server, the previous connection is dropped and a new connection is established. 
</div>
</div><p>
<a class="anchor" name="65085de08d705e8b90bfc310cd77b125"></a><!-- doxytag: member="mysqlpp::Connection::connected" ref="65085de08d705e8b90bfc310cd77b125" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::connected           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns true if connection was established successfully. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>true if connection was established successfully </dd></dl>

</div>
</div><p>
<a class="anchor" name="44070d9f1bee49126320ad815a854ed3"></a><!-- doxytag: member="mysqlpp::Connection::copy" ref="44070d9f1bee49126320ad815a854ed3" args="(const Connection &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mysqlpp::Connection::copy           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Establish a new connection as a copy of an existing one. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the connection to copy </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="71356d1ca53c988bf9f1e1946e4a7f48"></a><!-- doxytag: member="mysqlpp::Connection::count_rows" ref="71356d1ca53c988bf9f1e1946e4a7f48" args="(const std::string &amp;table)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ulonglong mysqlpp::Connection::count_rows           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>table</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the number of rows in a table. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>table</em>&nbsp;</td><td>name of table whose rows you want counted</td></tr>
  </table>
</dl>
This is syntactic sugar for a <code>SELECT</code> <code>COUNT(*)</code> <code>FROM</code> <code>table</code> SQL query. 
</div>
</div><p>
<a class="anchor" name="c9852fb87572c6f10c6de051bacf6b8d"></a><!-- doxytag: member="mysqlpp::Connection::create_db" ref="c9852fb87572c6f10c6de051bacf6b8d" args="(const std::string &amp;db)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::create_db           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>db</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Ask the database server to create a database. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>db</em>&nbsp;</td><td>name of database to create</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if database was created successfully </dd></dl>

</div>
</div><p>
<a class="anchor" name="a073e784a16a9d4b357740a626a6b2e1"></a><!-- doxytag: member="mysqlpp::Connection::drop_db" ref="a073e784a16a9d4b357740a626a6b2e1" args="(const std::string &amp;db)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::drop_db           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>db</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Asks the database server to drop (destroy) a database. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>db</em>&nbsp;</td><td>name of database to destroy</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if database was dropped successfully </dd></dl>

</div>
</div><p>
<a class="anchor" name="73c67c9a4d4c77fcf2c7a98555542c8a"></a><!-- doxytag: member="mysqlpp::Connection::error" ref="73c67c9a4d4c77fcf2c7a98555542c8a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * mysqlpp::Connection::error           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return error message for last error associated with this connection. 
<p>
Returns either a MySQL++-specific error message if one exists, or one from the current database driver otherwise. 
</div>
</div><p>
<a class="anchor" name="2a047f5c6028d5fb95fad9d8062f2e87"></a><!-- doxytag: member="mysqlpp::Connection::ipc_info" ref="2a047f5c6028d5fb95fad9d8062f2e87" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string mysqlpp::Connection::ipc_info           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get information about the IPC connection to the database server. 
<p>
<a class="el" href="classmysqlpp_1_1String.html">String</a> contains info about type of connection (e.g. TCP/IP, named pipe, Unix socket...) and the server hostname. 
</div>
</div><p>
<a class="anchor" name="4964b1400101fc0e812d342c12599e42"></a><!-- doxytag: member="mysqlpp::Connection::kill" ref="4964b1400101fc0e812d342c12599e42" args="(unsigned long tid) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::kill           </td>
          <td>(</td>
          <td class="paramtype">unsigned long&nbsp;</td>
          <td class="paramname"> <em>tid</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Kill a database server thread. 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classmysqlpp_1_1Connection.html#60c43e10eb9db82c075443add56785ce">thread_id()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="a63bfef0bee8b3f94a8d33e52e374f40"></a><!-- doxytag: member="mysqlpp::Connection::operator private_bool_type" ref="a63bfef0bee8b3f94a8d33e52e374f40" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mysqlpp::Connection::operator private_bool_type           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Test whether any error has occurred within the object. 
<p>
Allows the object to be used in bool context, like this:<p>
<div class="fragment"><pre class="fragment">







        <span class="comment">/// </span>
</pre></div><p>
Prior to MySQL++ v3, the object was always falsy when we weren't connected. Now a true return simply indicates a lack of errors. If you've been using this to test for whether the connection is still up, you need to call <a class="el" href="classmysqlpp_1_1Connection.html#65085de08d705e8b90bfc310cd77b125">connected()</a> instead. 
</div>
</div><p>
<a class="anchor" name="c1dbc411f7ab1debbabe241561fe4091"></a><!-- doxytag: member="mysqlpp::Connection::ping" ref="c1dbc411f7ab1debbabe241561fe4091" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::ping           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
"Pings" the database server 
<p>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>true</em>&nbsp;</td><td>if server is responding </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>false</em>&nbsp;</td><td>if either we already know the connection is down and cannot re-establish it, or if the server did not respond to the ping and we could not re-establish the connection. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="f7aaad10bb2f08cae4384f5c227c0f19"></a><!-- doxytag: member="mysqlpp::Connection::query" ref="f7aaad10bb2f08cae4384f5c227c0f19" args="(const std::string &amp;qstr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmysqlpp_1_1Query.html">Query</a> mysqlpp::Connection::query           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>qstr</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a new query object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>qstr</em>&nbsp;</td><td>initial query string </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="6954d437d52004915fbc96a0be79ab37"></a><!-- doxytag: member="mysqlpp::Connection::query" ref="6954d437d52004915fbc96a0be79ab37" args="(const char *qstr=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmysqlpp_1_1Query.html">Query</a> mysqlpp::Connection::query           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>qstr</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a new query object. 
<p>
The returned query object is tied to this connection object, so when you call a method like <a class="el" href="classmysqlpp_1_1Query.html#03ee1b9e393d88de946f5be804ea88cf">execute() </a> on that object, the query is sent to the server this object is connected to.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>qstr</em>&nbsp;</td><td>an optional query string for populating the new <a class="el" href="classmysqlpp_1_1Query.html">Query</a> object </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="f1bd6c380dea4cf157e4de7295550a0c"></a><!-- doxytag: member="mysqlpp::Connection::select_db" ref="f1bd6c380dea4cf157e4de7295550a0c" args="(const std::string &amp;db)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::select_db           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>db</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Change to a different database managed by the database server we are connected to. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>db</em>&nbsp;</td><td>database to switch to</td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>true</em>&nbsp;</td><td>if we changed databases successfully </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="266f69b0e8d9d588e8cc6c5a2a897b87"></a><!-- doxytag: member="mysqlpp::Connection::set_option" ref="266f69b0e8d9d588e8cc6c5a2a897b87" args="(Option *o)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::set_option           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmysqlpp_1_1Option.html">Option</a> *&nbsp;</td>
          <td class="paramname"> <em>o</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets a connection option. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>o</em>&nbsp;</td><td>pointer to any derivative of <a class="el" href="classmysqlpp_1_1Option.html">Option</a> allocated on the heap</td></tr>
  </table>
</dl>
Objects passed to this method and successfully set will be released when this <a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> object is destroyed. If an error occurs while setting the option the object will be deleted immediately.<p>
Because there are so many <a class="el" href="classmysqlpp_1_1Option.html">Option</a> subclasses, the actual effect of this function has a wide range. This mechanism abstracts away many things that are unrelated down at the database driver level, hiding them behind a coherent, type-safe interface.<p>
The rules about which options can be set, when, are up to the underlying database driver. Some must be set before the connection is established because they can only be used during that connection setup process. Others can be set at any time after the connection comes up. If you get it wrong, you'll get a <a class="el" href="classmysqlpp_1_1BadOption.html">BadOption</a> exception.<p>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>true</em>&nbsp;</td><td>if option was successfully set </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="60c43e10eb9db82c075443add56785ce"></a><!-- doxytag: member="mysqlpp::Connection::thread_id" ref="60c43e10eb9db82c075443add56785ce" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long mysqlpp::Connection::thread_id           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the database server's thread ID for this connection. 
<p>
This has nothing to do with threading on the client side. The only thing you can do with this value is pass it to <a class="el" href="classmysqlpp_1_1Connection.html#4964b1400101fc0e812d342c12599e42">kill()</a>. 
</div>
</div><p>
<a class="anchor" name="ade1534fea22a5d1e2f315515f23f880"></a><!-- doxytag: member="mysqlpp::Connection::thread_start" ref="ade1534fea22a5d1e2f315515f23f880" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mysqlpp::Connection::thread_start           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tells the underlying database driver that the current thread is now using its services. 
<p>
It's not necessary to call this from the thread that creates the connection as it's done automatically. This method exists for times when multiple threads may use this object; it allows the underlying database driver to set up any per-thread data structures it needs.<p>
The MySQL++ user manual's <a href="../userman/threads.html">chapter on threads</a> details two major strategies for dealing with connections in the face of threads. The Connection-per-thread option frees you from ever having to call this method. The other documented strategy is to use <a class="el" href="classmysqlpp_1_1ConnectionPool.html">ConnectionPool</a>, which opens the possibility for one thread to create a connection that another uses, so you do need to call this method in that case, or with any other similar strategy.<p>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>True</em>&nbsp;</td><td>if there was no problem </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="connection_8h-source.html">connection.h</a><li>connection.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Feb 29 16:26:20 2008 for MySQL++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>