~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qsqldriver.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/sql/kernel/qsqldriver.cpp -->
 
5
<!-- qsqldriver.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QSqlDriver Class Reference</title>
 
7
  <title>Qt 4.6: QSqlDriver Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QSqlDriver" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QSqlDriver Class Reference<br /><span class="small-subtitle">[<a href="qtsql.html">QtSql</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QSqlDriver Class Reference<br /><span class="small-subtitle">[<a href="qtsql.html">QtSql</a> module]</span>
16
17
</h1>
17
18
<p>The QSqlDriver class is an abstract base class for accessing specific SQL databases. <a href="#details">More...</a></p>
18
 
<pre> #include &lt;QSqlDriver&gt;</pre><p>Inherits <a href="qobject.html">QObject</a>.</p>
 
19
<pre> #include &lt;QSqlDriver&gt;</pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
 
20
<p>Inherits <a href="qobject.html">QObject</a>.</p>
19
21
<ul>
20
22
<li><a href="qsqldriver-members.html">List of all members, including inherited members</a></li>
21
23
<li><a href="qsqldriver-qt3.html">Qt 3 support members</a></li>
22
24
</ul>
 
25
<hr />
23
26
<a name="public-types"></a>
24
 
<h3>Public Types</h3>
25
 
<ul>
26
 
<li><div class="fn"></div>enum <b><a href="qsqldriver.html#DriverFeature-enum">DriverFeature</a></b> { Transactions, QuerySize, BLOB, Unicode, ..., MultipleResultSets }</li>
27
 
<li><div class="fn"></div>enum <b><a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a></b> { FieldName, TableName }</li>
28
 
<li><div class="fn"></div>enum <b><a href="qsqldriver.html#StatementType-enum">StatementType</a></b> { WhereStatement, SelectStatement, UpdateStatement, InsertStatement, DeleteStatement }</li>
29
 
</ul>
 
27
<h2>Public Types</h2>
 
28
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
29
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#DriverFeature-enum">DriverFeature</a></b> { Transactions, QuerySize, BLOB, Unicode, ..., MultipleResultSets }</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a></b> { FieldName, TableName }</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#StatementType-enum">StatementType</a></b> { WhereStatement, SelectStatement, UpdateStatement, InsertStatement, DeleteStatement }</td></tr>
 
32
</table>
 
33
<hr />
30
34
<a name="public-functions"></a>
31
 
<h3>Public Functions</h3>
32
 
<ul>
33
 
<li><div class="fn"></div><b><a href="qsqldriver.html#QSqlDriver">QSqlDriver</a></b> ( QObject * <i>parent</i> = 0 )</li>
34
 
<li><div class="fn"></div><b><a href="qsqldriver.html#dtor.QSqlDriver">~QSqlDriver</a></b> ()</li>
35
 
<li><div class="fn"></div>virtual bool <b><a href="qsqldriver.html#beginTransaction">beginTransaction</a></b> ()</li>
36
 
<li><div class="fn"></div>virtual void <b><a href="qsqldriver.html#close">close</a></b> () = 0</li>
37
 
<li><div class="fn"></div>virtual bool <b><a href="qsqldriver.html#commitTransaction">commitTransaction</a></b> ()</li>
38
 
<li><div class="fn"></div>virtual QSqlResult * <b><a href="qsqldriver.html#createResult">createResult</a></b> () const = 0</li>
39
 
<li><div class="fn"></div>virtual QString <b><a href="qsqldriver.html#escapeIdentifier">escapeIdentifier</a></b> ( const QString &amp; <i>identifier</i>, IdentifierType <i>type</i> ) const</li>
40
 
<li><div class="fn"></div>virtual QString <b><a href="qsqldriver.html#formatValue">formatValue</a></b> ( const QSqlField &amp; <i>field</i>, bool <i>trimStrings</i> = false ) const</li>
41
 
<li><div class="fn"></div>virtual QVariant <b><a href="qsqldriver.html#handle">handle</a></b> () const</li>
42
 
<li><div class="fn"></div>virtual bool <b><a href="qsqldriver.html#hasFeature">hasFeature</a></b> ( DriverFeature <i>feature</i> ) const = 0</li>
43
 
<li><div class="fn"></div>virtual bool <b><a href="qsqldriver.html#isOpen">isOpen</a></b> () const</li>
44
 
<li><div class="fn"></div>bool <b><a href="qsqldriver.html#isOpenError">isOpenError</a></b> () const</li>
45
 
<li><div class="fn"></div>QSqlError <b><a href="qsqldriver.html#lastError">lastError</a></b> () const</li>
46
 
<li><div class="fn"></div>virtual bool <b><a href="qsqldriver.html#open">open</a></b> ( const QString &amp; <i>db</i>, const QString &amp; <i>user</i> = QString(), const QString &amp; <i>password</i> = QString(), const QString &amp; <i>host</i> = QString(), int <i>port</i> = -1, const QString &amp; <i>options</i> = QString() ) = 0</li>
47
 
<li><div class="fn"></div>virtual QSqlIndex <b><a href="qsqldriver.html#primaryIndex">primaryIndex</a></b> ( const QString &amp; <i>tableName</i> ) const</li>
48
 
<li><div class="fn"></div>virtual QSqlRecord <b><a href="qsqldriver.html#record">record</a></b> ( const QString &amp; <i>tableName</i> ) const</li>
49
 
<li><div class="fn"></div>virtual bool <b><a href="qsqldriver.html#rollbackTransaction">rollbackTransaction</a></b> ()</li>
50
 
<li><div class="fn"></div>virtual QString <b><a href="qsqldriver.html#sqlStatement">sqlStatement</a></b> ( StatementType <i>type</i>, const QString &amp; <i>tableName</i>, const QSqlRecord &amp; <i>rec</i>, bool <i>preparedStatement</i> ) const</li>
51
 
<li><div class="fn"></div>bool <b><a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a></b> ( const QString &amp; <i>name</i> )</li>
52
 
<li><div class="fn"></div>QStringList <b><a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a></b> () const</li>
53
 
<li><div class="fn"></div>virtual QStringList <b><a href="qsqldriver.html#tables">tables</a></b> ( QSql::TableType <i>tableType</i> ) const</li>
54
 
<li><div class="fn"></div>bool <b><a href="qsqldriver.html#unsubscribeFromNotification">unsubscribeFromNotification</a></b> ( const QString &amp; <i>name</i> )</li>
55
 
</ul>
56
 
<ul>
57
 
<li><div class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
58
 
</ul>
 
35
<h2>Public Functions</h2>
 
36
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
37
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#QSqlDriver">QSqlDriver</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#dtor.QSqlDriver">~QSqlDriver</a></b> ()</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#beginTransaction">beginTransaction</a></b> ()</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#close">close</a></b> () = 0</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#commitTransaction">commitTransaction</a></b> ()</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlResult * </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#createResult">createResult</a></b> () const = 0</td></tr>
 
43
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#escapeIdentifier">escapeIdentifier</a></b> ( const QString &amp; <i>identifier</i>, IdentifierType <i>type</i> ) const</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#formatValue">formatValue</a></b> ( const QSqlField &amp; <i>field</i>, bool <i>trimStrings</i> = false ) const</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#handle">handle</a></b> () const</td></tr>
 
46
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#hasFeature">hasFeature</a></b> ( DriverFeature <i>feature</i> ) const = 0</td></tr>
 
47
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#isIdentifierEscaped">isIdentifierEscaped</a></b> ( const QString &amp; <i>identifier</i>, IdentifierType <i>type</i> ) const</td></tr>
 
48
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#isOpen">isOpen</a></b> () const</td></tr>
 
49
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#isOpenError">isOpenError</a></b> () const</td></tr>
 
50
<tr><td class="memItemLeft" align="right" valign="top">QSqlError </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#lastError">lastError</a></b> () const</td></tr>
 
51
<tr><td class="memItemLeft" align="right" valign="top">QSql::NumericalPrecisionPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#numericalPrecisionPolicy">numericalPrecisionPolicy</a></b> () const</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#open">open</a></b> ( const QString &amp; <i>db</i>, const QString &amp; <i>user</i> = QString(), const QString &amp; <i>password</i> = QString(), const QString &amp; <i>host</i> = QString(), int <i>port</i> = -1, const QString &amp; <i>options</i> = QString() ) = 0</td></tr>
 
53
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlIndex </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#primaryIndex">primaryIndex</a></b> ( const QString &amp; <i>tableName</i> ) const</td></tr>
 
54
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlRecord </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#record">record</a></b> ( const QString &amp; <i>tableName</i> ) const</td></tr>
 
55
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#rollbackTransaction">rollbackTransaction</a></b> ()</td></tr>
 
56
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#setNumericalPrecisionPolicy">setNumericalPrecisionPolicy</a></b> ( QSql::NumericalPrecisionPolicy <i>precisionPolicy</i> )</td></tr>
 
57
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#sqlStatement">sqlStatement</a></b> ( StatementType <i>type</i>, const QString &amp; <i>tableName</i>, const QSqlRecord &amp; <i>rec</i>, bool <i>preparedStatement</i> ) const</td></tr>
 
58
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#stripDelimiters">stripDelimiters</a></b> ( const QString &amp; <i>identifier</i>, IdentifierType <i>type</i> ) const</td></tr>
 
59
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
60
<tr><td class="memItemLeft" align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a></b> () const</td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">virtual QStringList </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#tables">tables</a></b> ( QSql::TableType <i>tableType</i> ) const</td></tr>
 
62
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#unsubscribeFromNotification">unsubscribeFromNotification</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
63
</table>
 
64
<ul>
 
65
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
66
</ul>
 
67
<hr />
59
68
<a name="signals"></a>
60
 
<h3>Signals</h3>
61
 
<ul>
62
 
<li><div class="fn"></div>void <b><a href="qsqldriver.html#notification">notification</a></b> ( const QString &amp; <i>name</i> )</li>
63
 
</ul>
64
 
<ul>
65
 
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
66
 
</ul>
 
69
<h2>Signals</h2>
 
70
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
71
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#notification">notification</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
72
</table>
 
73
<ul>
 
74
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
75
</ul>
 
76
<hr />
67
77
<a name="protected-functions"></a>
68
 
<h3>Protected Functions</h3>
69
 
<ul>
70
 
<li><div class="fn"></div>virtual void <b><a href="qsqldriver.html#setLastError">setLastError</a></b> ( const QSqlError &amp; <i>error</i> )</li>
71
 
<li><div class="fn"></div>virtual void <b><a href="qsqldriver.html#setOpen">setOpen</a></b> ( bool <i>open</i> )</li>
72
 
<li><div class="fn"></div>virtual void <b><a href="qsqldriver.html#setOpenError">setOpenError</a></b> ( bool <i>error</i> )</li>
73
 
</ul>
74
 
<ul>
75
 
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
76
 
</ul>
 
78
<h2>Protected Functions</h2>
 
79
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
80
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#setLastError">setLastError</a></b> ( const QSqlError &amp; <i>error</i> )</td></tr>
 
81
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#setOpen">setOpen</a></b> ( bool <i>open</i> )</td></tr>
 
82
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#setOpenError">setOpenError</a></b> ( bool <i>error</i> )</td></tr>
 
83
</table>
 
84
<ul>
 
85
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
86
</ul>
 
87
<hr />
77
88
<a name="protected-slots"></a>
78
 
<h3>Protected Slots</h3>
79
 
<ul>
80
 
<li><div class="fn"></div>bool <b><a href="qsqldriver.html#subscribeToNotificationImplementation">subscribeToNotificationImplementation</a></b> ( const QString &amp; <i>name</i> )</li>
81
 
<li><div class="fn"></div>QStringList <b><a href="qsqldriver.html#subscribedToNotificationsImplementation">subscribedToNotificationsImplementation</a></b> () const</li>
82
 
<li><div class="fn"></div>bool <b><a href="qsqldriver.html#unsubscribeFromNotificationImplementation">unsubscribeFromNotificationImplementation</a></b> ( const QString &amp; <i>name</i> )</li>
83
 
</ul>
 
89
<h2>Protected Slots</h2>
 
90
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
91
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#isIdentifierEscapedImplementation">isIdentifierEscapedImplementation</a></b> ( const QString &amp; <i>identifier</i>, IdentifierType <i>type</i> ) const</td></tr>
 
92
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#stripDelimitersImplementation">stripDelimitersImplementation</a></b> ( const QString &amp; <i>identifier</i>, IdentifierType <i>type</i> ) const</td></tr>
 
93
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#subscribeToNotificationImplementation">subscribeToNotificationImplementation</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
94
<tr><td class="memItemLeft" align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#subscribedToNotificationsImplementation">subscribedToNotificationsImplementation</a></b> () const</td></tr>
 
95
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsqldriver.html#unsubscribeFromNotificationImplementation">unsubscribeFromNotificationImplementation</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
96
</table>
84
97
<h3>Additional Inherited Members</h3>
85
98
<ul>
86
99
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
96
109
<p>See also <a href="qsqldatabase.html">QSqlDatabase</a> and <a href="qsqlresult.html">QSqlResult</a>.</p>
97
110
<hr />
98
111
<h2>Member Type Documentation</h2>
 
112
<a name="//apple_ref/cpp/tag/QSqlDriver/DriverFeature" />
 
113
<a name="//apple_ref/cpp/econst/QSqlDriver/Transactions" />
 
114
<a name="//apple_ref/cpp/econst/QSqlDriver/QuerySize" />
 
115
<a name="//apple_ref/cpp/econst/QSqlDriver/BLOB" />
 
116
<a name="//apple_ref/cpp/econst/QSqlDriver/Unicode" />
 
117
<a name="//apple_ref/cpp/econst/QSqlDriver/PreparedQueries" />
 
118
<a name="//apple_ref/cpp/econst/QSqlDriver/NamedPlaceholders" />
 
119
<a name="//apple_ref/cpp/econst/QSqlDriver/PositionalPlaceholders" />
 
120
<a name="//apple_ref/cpp/econst/QSqlDriver/LastInsertId" />
 
121
<a name="//apple_ref/cpp/econst/QSqlDriver/BatchOperations" />
 
122
<a name="//apple_ref/cpp/econst/QSqlDriver/SimpleLocking" />
 
123
<a name="//apple_ref/cpp/econst/QSqlDriver/LowPrecisionNumbers" />
 
124
<a name="//apple_ref/cpp/econst/QSqlDriver/EventNotifications" />
 
125
<a name="//apple_ref/cpp/econst/QSqlDriver/FinishQuery" />
 
126
<a name="//apple_ref/cpp/econst/QSqlDriver/MultipleResultSets" />
99
127
<h3 class="fn"><a name="DriverFeature-enum"></a>enum QSqlDriver::DriverFeature</h3>
100
128
<p>This enum contains a list of features a driver might support. Use <a href="qsqldriver.html#hasFeature">hasFeature</a>() to query whether a feature is supported or not.</p>
101
 
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
 
129
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
102
130
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
103
131
<tr><td valign="top"><tt>QSqlDriver::Transactions</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Whether the driver supports SQL transactions.</td></tr>
104
132
<tr><td valign="top"><tt>QSqlDriver::QuerySize</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Whether the database is capable of reporting the size of a query. Note that some databases do not support returning the size (i.e&#x2e; number of rows returned) of a query, in which case <a href="qsqlquery.html#size">QSqlQuery::size</a>() will return -1.</td></tr>
117
145
</table></p>
118
146
<p>More information about supported features can be found in the <a href="sql-driver.html">Qt SQL driver</a> documentation.</p>
119
147
<p>See also <a href="qsqldriver.html#hasFeature">hasFeature</a>().</p>
 
148
<a name="//apple_ref/cpp/tag/QSqlDriver/IdentifierType" />
 
149
<a name="//apple_ref/cpp/econst/QSqlDriver/FieldName" />
 
150
<a name="//apple_ref/cpp/econst/QSqlDriver/TableName" />
120
151
<h3 class="fn"><a name="IdentifierType-enum"></a>enum QSqlDriver::IdentifierType</h3>
121
152
<p>This enum contains a list of SQL identifier types.</p>
122
 
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
 
153
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
123
154
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
124
155
<tr><td valign="top"><tt>QSqlDriver::FieldName</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">A SQL field name</td></tr>
125
156
<tr><td valign="top"><tt>QSqlDriver::TableName</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">A SQL table name</td></tr>
126
157
</table></p>
 
158
<a name="//apple_ref/cpp/tag/QSqlDriver/StatementType" />
 
159
<a name="//apple_ref/cpp/econst/QSqlDriver/WhereStatement" />
 
160
<a name="//apple_ref/cpp/econst/QSqlDriver/SelectStatement" />
 
161
<a name="//apple_ref/cpp/econst/QSqlDriver/UpdateStatement" />
 
162
<a name="//apple_ref/cpp/econst/QSqlDriver/InsertStatement" />
 
163
<a name="//apple_ref/cpp/econst/QSqlDriver/DeleteStatement" />
127
164
<h3 class="fn"><a name="StatementType-enum"></a>enum QSqlDriver::StatementType</h3>
128
165
<p>This enum contains a list of SQL statement (or clause) types the driver can create.</p>
129
 
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
 
166
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
130
167
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
131
168
<tr><td valign="top"><tt>QSqlDriver::WhereStatement</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">An SQL <tt>WHERE</tt> statement (e.g&#x2e;, <tt>WHERE f = 5</tt>).</td></tr>
132
169
<tr><td valign="top"><tt>QSqlDriver::SelectStatement</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">An SQL <tt>SELECT</tt> statement (e.g&#x2e;, <tt>SELECT f FROM t</tt>).</td></tr>
137
174
<p>See also <a href="qsqldriver.html#sqlStatement">sqlStatement</a>().</p>
138
175
<hr />
139
176
<h2>Member Function Documentation</h2>
 
177
<a name="//apple_ref/cpp/instm/QSqlDriver/QSqlDriver" />
140
178
<h3 class="fn"><a name="QSqlDriver"></a>QSqlDriver::QSqlDriver ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
141
179
<p>Constructs a new driver with the given <i>parent</i>.</p>
 
180
<a name="//apple_ref/cpp/instm/QSqlDriver/~QSqlDriver" />
142
181
<h3 class="fn"><a name="dtor.QSqlDriver"></a>QSqlDriver::~QSqlDriver ()</h3>
143
182
<p>Destroys the object and frees any allocated resources.</p>
 
183
<a name="//apple_ref/cpp/instm/QSqlDriver/beginTransaction" />
144
184
<h3 class="fn"><a name="beginTransaction"></a>bool QSqlDriver::beginTransaction ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
145
185
<p>This function is called to begin a transaction. If successful, return true, otherwise return false. The default implementation does nothing and returns false.</p>
146
186
<p>See also <a href="qsqldriver.html#commitTransaction">commitTransaction</a>() and <a href="qsqldriver.html#rollbackTransaction">rollbackTransaction</a>().</p>
 
187
<a name="//apple_ref/cpp/instm/QSqlDriver/close" />
147
188
<h3 class="fn"><a name="close"></a>void QSqlDriver::close ()&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
148
189
<p>Derived classes must reimplement this pure virtual function in order to close the database connection. Return true on success, false on failure.</p>
149
190
<p>See also <a href="qsqldriver.html#open">open</a>() and <a href="qsqldriver.html#setOpen">setOpen</a>().</p>
 
191
<a name="//apple_ref/cpp/instm/QSqlDriver/commitTransaction" />
150
192
<h3 class="fn"><a name="commitTransaction"></a>bool QSqlDriver::commitTransaction ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
151
193
<p>This function is called to commit a transaction. If successful, return true, otherwise return false. The default implementation does nothing and returns false.</p>
152
194
<p>See also <a href="qsqldriver.html#beginTransaction">beginTransaction</a>() and <a href="qsqldriver.html#rollbackTransaction">rollbackTransaction</a>().</p>
 
195
<a name="//apple_ref/cpp/instm/QSqlDriver/createResult" />
153
196
<h3 class="fn"><a name="createResult"></a><a href="qsqlresult.html">QSqlResult</a> * QSqlDriver::createResult () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
154
197
<p>Creates an empty SQL result on the database. Derived classes must reimplement this function and return a <a href="qsqlresult.html">QSqlResult</a> object appropriate for their database to the caller.</p>
 
198
<a name="//apple_ref/cpp/instm/QSqlDriver/escapeIdentifier" />
155
199
<h3 class="fn"><a name="escapeIdentifier"></a><a href="qstring.html">QString</a> QSqlDriver::escapeIdentifier ( const <a href="qstring.html">QString</a> &amp; <i>identifier</i>, <a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a> <i>type</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
156
200
<p>Returns the <i>identifier</i> escaped according to the database rules. <i>identifier</i> can either be a table name or field name, dependent on <i>type</i>.</p>
157
201
<p>The default implementation does nothing.</p>
 
202
<p>See also <a href="qsqldriver.html#isIdentifierEscaped">isIdentifierEscaped</a>().</p>
 
203
<a name="//apple_ref/cpp/instm/QSqlDriver/formatValue" />
158
204
<h3 class="fn"><a name="formatValue"></a><a href="qstring.html">QString</a> QSqlDriver::formatValue ( const <a href="qsqlfield.html">QSqlField</a> &amp; <i>field</i>, bool <i>trimStrings</i> = false ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
159
205
<p>Returns a string representation of the <i>field</i> value for the database. This is used, for example, when constructing INSERT and UPDATE statements.</p>
160
206
<p>The default implementation returns the value formatted as a string according to the following rules:</p>
165
211
<li>For any other field type, toString() is called on its value and the result of this is returned.</li>
166
212
</ul>
167
213
<p>See also <a href="qvariant.html#toString">QVariant::toString</a>().</p>
 
214
<a name="//apple_ref/cpp/instm/QSqlDriver/handle" />
168
215
<h3 class="fn"><a name="handle"></a><a href="qvariant.html">QVariant</a> QSqlDriver::handle () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
169
216
<p>Returns the low-level database handle wrapped in a <a href="qvariant.html">QVariant</a> or an invalid variant if there is no handle.</p>
170
217
<p><b>Warning:</b> Use this with uttermost care and only if you know what you're doing.</p>
192
239
     if (handle != 0) ...
193
240
 }</pre>
194
241
<p>See also <a href="qsqlresult.html#handle">QSqlResult::handle</a>().</p>
 
242
<a name="//apple_ref/cpp/instm/QSqlDriver/hasFeature" />
195
243
<h3 class="fn"><a name="hasFeature"></a>bool QSqlDriver::hasFeature ( <a href="qsqldriver.html#DriverFeature-enum">DriverFeature</a> <i>feature</i> ) const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
196
244
<p>Returns true if the driver supports feature <i>feature</i>; otherwise returns false.</p>
197
245
<p>Note that some databases need to be <a href="qsqldriver.html#open">open</a>() before this can be determined.</p>
198
246
<p>See also <a href="qsqldriver.html#DriverFeature-enum">DriverFeature</a>.</p>
 
247
<a name="//apple_ref/cpp/instm/QSqlDriver/isIdentifierEscaped" />
 
248
<h3 class="fn"><a name="isIdentifierEscaped"></a>bool QSqlDriver::isIdentifierEscaped ( const <a href="qstring.html">QString</a> &amp; <i>identifier</i>, <a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a> <i>type</i> ) const</h3>
 
249
<p>Returns whether <i>identifier</i> is escaped according to the database rules. <i>identifier</i> can either be a table name or field name, dependent on <i>type</i>.</p>
 
250
<p><b>Warning:</b> Because of binary compatability constraints, this function is not virtual. If you want to provide your own implementation in your <a href="qsqldriver.html">QSqlDriver</a> subclass, reimplement the <a href="qsqldriver.html#isIdentifierEscapedImplementation">isIdentifierEscapedImplementation</a>() slot in your subclass instead. The isIdentifierEscapedFunction() will dynamically detect the slot and call it.</p>
 
251
<p>See also <a href="qsqldriver.html#stripDelimiters">stripDelimiters</a>() and <a href="qsqldriver.html#escapeIdentifier">escapeIdentifier</a>().</p>
 
252
<a name="//apple_ref/cpp/instm/QSqlDriver/isIdentifierEscapedImplementation" />
 
253
<h3 class="fn"><a name="isIdentifierEscapedImplementation"></a>bool QSqlDriver::isIdentifierEscapedImplementation ( const <a href="qstring.html">QString</a> &amp; <i>identifier</i>, <a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a> <i>type</i> ) const&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
254
<p>This slot returns whether <i>identifier</i> is escaped according to the database rules. <i>identifier</i> can either be a table name or field name, dependent on <i>type</i>.</p>
 
255
<p>Because of binary compatability constraints, <a href="qsqldriver.html#isIdentifierEscaped">isIdentifierEscaped</a>() function (introduced in Qt 4.5) is not virtual. Instead, <a href="qsqldriver.html#isIdentifierEscaped">isIdentifierEscaped</a>() will dynamically detect and call <i>this</i> slot. The default implementation assumes the escape/delimiter character is a double quote. Reimplement this slot in your own <a href="qsqldriver.html">QSqlDriver</a> if your database engine uses a different delimiter character.</p>
 
256
<p>This function was introduced in Qt 4.6.</p>
 
257
<p>See also <a href="qsqldriver.html#isIdentifierEscaped">isIdentifierEscaped</a>().</p>
 
258
<a name="//apple_ref/cpp/instm/QSqlDriver/isOpen" />
199
259
<h3 class="fn"><a name="isOpen"></a>bool QSqlDriver::isOpen () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
200
260
<p>Returns true if the database connection is open; otherwise returns false.</p>
 
261
<a name="//apple_ref/cpp/instm/QSqlDriver/isOpenError" />
201
262
<h3 class="fn"><a name="isOpenError"></a>bool QSqlDriver::isOpenError () const</h3>
202
263
<p>Returns true if the there was an error opening the database connection; otherwise returns false.</p>
 
264
<a name="//apple_ref/cpp/instm/QSqlDriver/lastError" />
203
265
<h3 class="fn"><a name="lastError"></a><a href="qsqlerror.html">QSqlError</a> QSqlDriver::lastError () const</h3>
204
266
<p>Returns a <a href="qsqlerror.html">QSqlError</a> object which contains information about the last error that occurred on the database.</p>
205
267
<p>See also <a href="qsqldriver.html#setLastError">setLastError</a>().</p>
 
268
<a name="//apple_ref/cpp/instm/QSqlDriver/notification" />
206
269
<h3 class="fn"><a name="notification"></a>void QSqlDriver::notification ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
207
270
<p>This signal is emitted when the database posts an event notification that the driver subscribes to. <i>name</i> identifies the event notification.</p>
208
271
<p>This function was introduced in Qt 4.4.</p>
209
272
<p>See also <a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a>().</p>
 
273
<a name="//apple_ref/cpp/instm/QSqlDriver/numericalPrecisionPolicy" />
 
274
<h3 class="fn"><a name="numericalPrecisionPolicy"></a><a href="qsql.html#NumericalPrecisionPolicy-enum">QSql::NumericalPrecisionPolicy</a> QSqlDriver::numericalPrecisionPolicy () const</h3>
 
275
<p>Returns the current default precision policy for the database connection.</p>
 
276
<p>This function was introduced in Qt 4.6.</p>
 
277
<p>See also <a href="qsql.html#NumericalPrecisionPolicy-enum">QSql::NumericalPrecisionPolicy</a>, <a href="qsqldriver.html#setNumericalPrecisionPolicy">setNumericalPrecisionPolicy</a>(), <a href="qsqlquery.html#numericalPrecisionPolicy">QSqlQuery::numericalPrecisionPolicy</a>(), and <a href="qsqlquery.html#setNumericalPrecisionPolicy">QSqlQuery::setNumericalPrecisionPolicy</a>().</p>
 
278
<a name="//apple_ref/cpp/instm/QSqlDriver/open" />
210
279
<h3 class="fn"><a name="open"></a>bool QSqlDriver::open ( const <a href="qstring.html">QString</a> &amp; <i>db</i>, const <a href="qstring.html">QString</a> &amp; <i>user</i> = QString(), const <a href="qstring.html">QString</a> &amp; <i>password</i> = QString(), const <a href="qstring.html">QString</a> &amp; <i>host</i> = QString(), int <i>port</i> = -1, const <a href="qstring.html">QString</a> &amp; <i>options</i> = QString() )&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
211
280
<p>Derived classes must reimplement this pure virtual function to open a database connection on database <i>db</i>, using user name <i>user</i>, password <i>password</i>, host <i>host</i>, port <i>port</i> and connection options <i>options</i>.</p>
212
281
<p>The function must return true on success and false on failure.</p>
213
282
<p>See also <a href="qsqldriver.html#setOpen">setOpen</a>().</p>
 
283
<a name="//apple_ref/cpp/instm/QSqlDriver/primaryIndex" />
214
284
<h3 class="fn"><a name="primaryIndex"></a><a href="qsqlindex.html">QSqlIndex</a> QSqlDriver::primaryIndex ( const <a href="qstring.html">QString</a> &amp; <i>tableName</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
215
285
<p>Returns the primary index for table <i>tableName</i>. Returns an empty <a href="qsqlindex.html">QSqlIndex</a> if the table doesn't have a primary index. The default implementation returns an empty index.</p>
 
286
<a name="//apple_ref/cpp/instm/QSqlDriver/record" />
216
287
<h3 class="fn"><a name="record"></a><a href="qsqlrecord.html">QSqlRecord</a> QSqlDriver::record ( const <a href="qstring.html">QString</a> &amp; <i>tableName</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
217
288
<p>Returns a <a href="qsqlrecord.html">QSqlRecord</a> populated with the names of the fields in table <i>tableName</i>. If no such table exists, an empty record is returned. The default implementation returns an empty record.</p>
 
289
<a name="//apple_ref/cpp/instm/QSqlDriver/rollbackTransaction" />
218
290
<h3 class="fn"><a name="rollbackTransaction"></a>bool QSqlDriver::rollbackTransaction ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
219
291
<p>This function is called to rollback a transaction. If successful, return true, otherwise return false. The default implementation does nothing and returns false.</p>
220
292
<p>See also <a href="qsqldriver.html#beginTransaction">beginTransaction</a>() and <a href="qsqldriver.html#commitTransaction">commitTransaction</a>().</p>
 
293
<a name="//apple_ref/cpp/instm/QSqlDriver/setLastError" />
221
294
<h3 class="fn"><a name="setLastError"></a>void QSqlDriver::setLastError ( const <a href="qsqlerror.html">QSqlError</a> &amp; <i>error</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
222
295
<p>This function is used to set the value of the last error, <i>error</i>, that occurred on the database.</p>
223
296
<p>See also <a href="qsqldriver.html#lastError">lastError</a>().</p>
 
297
<a name="//apple_ref/cpp/instm/QSqlDriver/setNumericalPrecisionPolicy" />
 
298
<h3 class="fn"><a name="setNumericalPrecisionPolicy"></a>void QSqlDriver::setNumericalPrecisionPolicy ( <a href="qsql.html#NumericalPrecisionPolicy-enum">QSql::NumericalPrecisionPolicy</a> <i>precisionPolicy</i> )</h3>
 
299
<p>Sets the default numerical precision policy used by queries created by this driver to <i>precisionPolicy</i>.</p>
 
300
<p>Note: Setting the default precision policy to <i>precisionPolicy</i> doesn't affect any currently active queries.</p>
 
301
<p>This function was introduced in Qt 4.6.</p>
 
302
<p>See also <a href="qsql.html#NumericalPrecisionPolicy-enum">QSql::NumericalPrecisionPolicy</a>, <a href="qsqldriver.html#numericalPrecisionPolicy">numericalPrecisionPolicy</a>(), <a href="qsqlquery.html#setNumericalPrecisionPolicy">QSqlQuery::setNumericalPrecisionPolicy</a>(), and <a href="qsqlquery.html#numericalPrecisionPolicy">QSqlQuery::numericalPrecisionPolicy</a>().</p>
 
303
<a name="//apple_ref/cpp/instm/QSqlDriver/setOpen" />
224
304
<h3 class="fn"><a name="setOpen"></a>void QSqlDriver::setOpen ( bool <i>open</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
225
305
<p>This function sets the open state of the database to <i>open</i>. Derived classes can use this function to report the status of <a href="qsqldriver.html#open">open</a>().</p>
226
306
<p>See also <a href="qsqldriver.html#open">open</a>() and <a href="qsqldriver.html#setOpenError">setOpenError</a>().</p>
 
307
<a name="//apple_ref/cpp/instm/QSqlDriver/setOpenError" />
227
308
<h3 class="fn"><a name="setOpenError"></a>void QSqlDriver::setOpenError ( bool <i>error</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
228
309
<p>This function sets the open error state of the database to <i>error</i>. Derived classes can use this function to report the status of <a href="qsqldriver.html#open">open</a>(). Note that if <i>error</i> is true the open state of the database is set to closed (i.e&#x2e;, <a href="qsqldriver.html#isOpen">isOpen</a>() returns false).</p>
229
310
<p>See also <a href="qsqldriver.html#isOpenError">isOpenError</a>(), <a href="qsqldriver.html#open">open</a>(), and <a href="qsqldriver.html#setOpen">setOpen</a>().</p>
 
311
<a name="//apple_ref/cpp/instm/QSqlDriver/sqlStatement" />
230
312
<h3 class="fn"><a name="sqlStatement"></a><a href="qstring.html">QString</a> QSqlDriver::sqlStatement ( <a href="qsqldriver.html#StatementType-enum">StatementType</a> <i>type</i>, const <a href="qstring.html">QString</a> &amp; <i>tableName</i>, const <a href="qsqlrecord.html">QSqlRecord</a> &amp; <i>rec</i>, bool <i>preparedStatement</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
231
313
<p>Returns a SQL statement of type <i>type</i> for the table <i>tableName</i> with the values from <i>rec</i>. If <i>preparedStatement</i> is true, the string will contain placeholders instead of values.</p>
232
314
<p>This method can be used to manipulate tables without having to worry about database-dependent SQL dialects. For non-prepared statements, the values will be properly escaped.</p>
 
315
<a name="//apple_ref/cpp/instm/QSqlDriver/stripDelimiters" />
 
316
<h3 class="fn"><a name="stripDelimiters"></a><a href="qstring.html">QString</a> QSqlDriver::stripDelimiters ( const <a href="qstring.html">QString</a> &amp; <i>identifier</i>, <a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a> <i>type</i> ) const</h3>
 
317
<p>Returns the <i>identifier</i> with the leading and trailing delimiters removed, <i>identifier</i> can either be a table name or field name, dependent on <i>type</i>. If <i>identifier</i> does not have leading and trailing delimiter characters, <i>identifier</i> is returned without modification.</p>
 
318
<p><b>Warning:</b> Because of binary compatability constraints, this function is not virtual, If you want to provide your own implementation in your <a href="qsqldriver.html">QSqlDriver</a> subclass, reimplement the <a href="qsqldriver.html#stripDelimitersImplementation">stripDelimitersImplementation</a>() slot in your subclass instead. The stripDelimiters() function will dynamically detect the slot and call it.</p>
 
319
<p>This function was introduced in Qt 4.5.</p>
 
320
<p>See also <a href="qsqldriver.html#isIdentifierEscaped">isIdentifierEscaped</a>().</p>
 
321
<a name="//apple_ref/cpp/instm/QSqlDriver/stripDelimitersImplementation" />
 
322
<h3 class="fn"><a name="stripDelimitersImplementation"></a><a href="qstring.html">QString</a> QSqlDriver::stripDelimitersImplementation ( const <a href="qstring.html">QString</a> &amp; <i>identifier</i>, <a href="qsqldriver.html#IdentifierType-enum">IdentifierType</a> <i>type</i> ) const&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
323
<p>This slot returns <i>identifier</i> with the leading and trailing delimiters removed, <i>identifier</i> can either be a tablename or field name, dependent on <i>type</i>. If <i>identifier</i> does not have leading and trailing delimiter characters, <i>identifier</i> is returned without modification.</p>
 
324
<p>Because of binary compatability constraints, the <a href="qsqldriver.html#stripDelimiters">stripDelimiters</a>() function (introduced in Qt 4.5) is not virtual. Instead, <a href="qsqldriver.html#stripDelimiters">stripDelimiters</a>() will dynamically detect and call <i>this</i> slot. It generally unnecessary to reimplement this slot.</p>
 
325
<p>This function was introduced in Qt 4.6.</p>
 
326
<p>See also <a href="qsqldriver.html#stripDelimiters">stripDelimiters</a>().</p>
 
327
<a name="//apple_ref/cpp/instm/QSqlDriver/subscribeToNotification" />
233
328
<h3 class="fn"><a name="subscribeToNotification"></a>bool QSqlDriver::subscribeToNotification ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
234
329
<p>This function is called to subscribe to event notifications from the database. <i>name</i> identifies the event notification.</p>
235
330
<p>If successful, return true, otherwise return false.</p>
238
333
<p><b>Warning:</b> Because of binary compatibility constraints, this function is not virtual. If you want to provide event notification support in your own <a href="qsqldriver.html">QSqlDriver</a> subclass, reimplement the <a href="qsqldriver.html#subscribeToNotificationImplementation">subscribeToNotificationImplementation</a>() slot in your subclass instead. The subscribeToNotification() function will dynamically detect the slot and call it.</p>
239
334
<p>This function was introduced in Qt 4.4.</p>
240
335
<p>See also <a href="qsqldriver.html#unsubscribeFromNotification">unsubscribeFromNotification</a>(), <a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a>(), and <a href="qsqldriver.html#hasFeature">QSqlDriver::hasFeature</a>().</p>
 
336
<a name="//apple_ref/cpp/instm/QSqlDriver/subscribeToNotificationImplementation" />
241
337
<h3 class="fn"><a name="subscribeToNotificationImplementation"></a>bool QSqlDriver::subscribeToNotificationImplementation ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
242
338
<p>This slot is called to subscribe to event notifications from the database. <i>name</i> identifies the event notification.</p>
243
339
<p>If successful, return true, otherwise return false.</p>
246
342
<p>Reimplement this slot to provide your own <a href="qsqldriver.html">QSqlDriver</a> subclass with event notification support; because of binary compatibility constraints, the <a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a>() function (introduced in Qt 4.4) is not virtual. Instead, <a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a>() will dynamically detect and call <i>this</i> slot. The default implementation does nothing and returns false.</p>
247
343
<p>This function was introduced in Qt 4.4.</p>
248
344
<p>See also <a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a>().</p>
 
345
<a name="//apple_ref/cpp/instm/QSqlDriver/subscribedToNotifications" />
249
346
<h3 class="fn"><a name="subscribedToNotifications"></a><a href="qstringlist.html">QStringList</a> QSqlDriver::subscribedToNotifications () const</h3>
250
347
<p>Returns a list of the names of the event notifications that are currently subscribed to.</p>
251
348
<p><b>Warning:</b> Because of binary compatibility constraints, this function is not virtual. If you want to provide event notification support in your own <a href="qsqldriver.html">QSqlDriver</a> subclass, reimplement the <a href="qsqldriver.html#subscribedToNotificationsImplementation">subscribedToNotificationsImplementation</a>() slot in your subclass instead. The subscribedToNotifications() function will dynamically detect the slot and call it.</p>
252
349
<p>This function was introduced in Qt 4.4.</p>
253
350
<p>See also <a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a>() and <a href="qsqldriver.html#unsubscribeFromNotification">unsubscribeFromNotification</a>().</p>
 
351
<a name="//apple_ref/cpp/instm/QSqlDriver/subscribedToNotificationsImplementation" />
254
352
<h3 class="fn"><a name="subscribedToNotificationsImplementation"></a><a href="qstringlist.html">QStringList</a> QSqlDriver::subscribedToNotificationsImplementation () const&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
255
353
<p>Returns a list of the names of the event notifications that are currently subscribed to.</p>
256
354
<p>Reimplement this slot to provide your own <a href="qsqldriver.html">QSqlDriver</a> subclass with event notification support; because of binary compatibility constraints, the <a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a>() function (introduced in Qt 4.4) is not virtual. Instead, <a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a>() will dynamically detect and call <i>this</i> slot. The default implementation simply returns an empty <a href="qstringlist.html">QStringList</a>.</p>
257
355
<p>This function was introduced in Qt 4.4.</p>
258
356
<p>See also <a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a>().</p>
 
357
<a name="//apple_ref/cpp/instm/QSqlDriver/tables" />
259
358
<h3 class="fn"><a name="tables"></a><a href="qstringlist.html">QStringList</a> QSqlDriver::tables ( <a href="qsql.html#TableType-enum">QSql::TableType</a> <i>tableType</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
260
359
<p>Returns a list of the names of the tables in the database. The default implementation returns an empty list.</p>
261
360
<p>The <i>tableType</i> argument describes what types of tables should be returned. Due to binary compatibility, the string contains the value of the enum QSql::TableTypes as text. An empty string should be treated as <a href="qsql.html#TableType-enum">QSql::Tables</a> for backward compatibility.</p>
 
361
<a name="//apple_ref/cpp/instm/QSqlDriver/unsubscribeFromNotification" />
262
362
<h3 class="fn"><a name="unsubscribeFromNotification"></a>bool QSqlDriver::unsubscribeFromNotification ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
263
363
<p>This function is called to unsubscribe from event notifications from the database. <i>name</i> identifies the event notification.</p>
264
364
<p>If successful, return true, otherwise return false.</p>
267
367
<p><b>Warning:</b> Because of binary compatibility constraints, this function is not virtual. If you want to provide event notification support in your own <a href="qsqldriver.html">QSqlDriver</a> subclass, reimplement the <a href="qsqldriver.html#unsubscribeFromNotificationImplementation">unsubscribeFromNotificationImplementation</a>() slot in your subclass instead. The unsubscribeFromNotification() function will dynamically detect the slot and call it.</p>
268
368
<p>This function was introduced in Qt 4.4.</p>
269
369
<p>See also <a href="qsqldriver.html#subscribeToNotification">subscribeToNotification</a>() and <a href="qsqldriver.html#subscribedToNotifications">subscribedToNotifications</a>().</p>
 
370
<a name="//apple_ref/cpp/instm/QSqlDriver/unsubscribeFromNotificationImplementation" />
270
371
<h3 class="fn"><a name="unsubscribeFromNotificationImplementation"></a>bool QSqlDriver::unsubscribeFromNotificationImplementation ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
271
372
<p>This slot is called to unsubscribe from event notifications from the database. <i>name</i> identifies the event notification.</p>
272
373
<p>If successful, return true, otherwise return false.</p>
277
378
<p>See also <a href="qsqldriver.html#unsubscribeFromNotification">unsubscribeFromNotification</a>().</p>
278
379
<p /><address><hr /><div align="center">
279
380
<table width="100%" cellspacing="0" border="0"><tr class="address">
280
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
281
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
282
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
283
 
</tr></table></div></address></body>
 
381
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
382
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
383
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
384
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
284
385
</html>