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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Data::SQLite::SessionImpl</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Data.SQLite.html" class="namespace">Poco::Data::SQLite</a></h1>
<h1 class="symbol">class SessionImpl</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Data/SQLite<br />
<b>Package:</b> SQLite<br />
<b>Header:</b> Poco/Data/SQLite/SessionImpl.h</p>
<h2>Description</h2>
<div class="description">
<p>Implements <a href="Poco.Data.SQLite.SessionImpl.html" title="class Poco::Data::SQLite::SessionImpl">SessionImpl</a> interface. </p>
<p>The following properties are supported: </p>
<ul>
<li>transactionMode: "DEFERRED", "IMMEDIATE" or "EXCLUSIVE" </li>
<li>maxRetryAttempts: maximum number of attemptes to retry an operation if database is locked or busy. Between retry attempts, sleep for a random time. </li>
<li>minRetrySleep: the minimum time (in milliseconds) waited between two retry attempts. </li>
<li>maxRetrySleep: the maximum time (in milliseconds) waited between two retry attempts. </li>
</ul>
<p>Notes: For automatic retries to work, you should start every transaction that at one point will write to the database with IMMEDIATE or EXCLUSIVE mode. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b>Poco::Data::AbstractSessionImpl < SessionImpl ></p>
<p><b>All Base Classes: </b>Poco::Data::AbstractSessionImpl < SessionImpl ></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Data.SQLite.SessionImpl.html#2020" title="Poco::Data::SQLite::SessionImpl::begin()">begin</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2023" title="Poco::Data::SQLite::SessionImpl::close()">close</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2021" title="Poco::Data::SQLite::SessionImpl::commit()">commit</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2019" title="Poco::Data::SQLite::SessionImpl::createStatementImpl()">createStatementImpl</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2034" title="Poco::Data::SQLite::SessionImpl::getMaxRetryAttempts()">getMaxRetryAttempts</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2044" title="Poco::Data::SQLite::SessionImpl::getMaxRetrySleep()">getMaxRetrySleep</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2039" title="Poco::Data::SQLite::SessionImpl::getMinRetrySleep()">getMinRetrySleep</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2029" title="Poco::Data::SQLite::SessionImpl::getTransactionMode()">getTransactionMode</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2025" title="Poco::Data::SQLite::SessionImpl::isConnected()">isConnected</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2024" title="Poco::Data::SQLite::SessionImpl::isTransaction()">isTransaction</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2022" title="Poco::Data::SQLite::SessionImpl::rollback()">rollback</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2031" title="Poco::Data::SQLite::SessionImpl::setMaxRetryAttempts()">setMaxRetryAttempts</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2041" title="Poco::Data::SQLite::SessionImpl::setMaxRetrySleep()">setMaxRetrySleep</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2036" title="Poco::Data::SQLite::SessionImpl::setMinRetrySleep()">setMinRetrySleep</a>, <a href="Poco.Data.SQLite.SessionImpl.html#2026" title="Poco::Data::SQLite::SessionImpl::setTransactionMode()">setTransactionMode</a></p>
<h2>Enumerations</h2>
<h3><i>Anonymous</i></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="2013">DEFAULT_MAX_RETRY_ATTEMPTS</a> = 0</p>
<div class="description">
<p>Default maximum number of attempts to retry an operation if the database is locked. </p>
</div>
<p class="decl"><a name="2014">DEFAULT_MIN_RETRY_SLEEP</a> = 2</p>
<div class="description">
<p>Default minimum sleep interval (milliseconds) between retry attempts. </p>
</div>
<p class="decl"><a name="2015">DEFAULT_MAX_RETRY_SLEEP</a> = 20</p>
<div class="description">
<p>Default maximum sleep interval (milliseconds) between retry attempts. </p>
</div>
<h2>Constructors</h2>
<h3><a name="2016">SessionImpl</a></h3>
<p class="decl"><a href="Poco.Data.SQLite.SessionImpl.html" title="class Poco::Data::SQLite::SessionImpl">SessionImpl</a>(<br /> const std::string & fileName<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Data.SQLite.SessionImpl.html" title="class Poco::Data::SQLite::SessionImpl">SessionImpl</a>. Opens a connection to the database. </p>
</div>
<h2>Destructor</h2>
<h3><a name="2018">~SessionImpl</a></h3>
<p class="decl">~<a href="Poco.Data.SQLite.SessionImpl.html" title="class Poco::Data::SQLite::SessionImpl">SessionImpl</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Data.SQLite.SessionImpl.html" title="class Poco::Data::SQLite::SessionImpl">SessionImpl</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="2020">begin</a></h3>
<p class="decl">void begin();</p>
<div class="description">
<p>Starts a transaction. </p>
</div>
<h3><a name="2023">close</a></h3>
<p class="decl">void close();</p>
<div class="description">
<p>Closes the session. </p>
</div>
<h3><a name="2021">commit</a></h3>
<p class="decl">void commit();</p>
<div class="description">
<p>Commits and ends a transaction. </p>
</div>
<h3><a name="2019">createStatementImpl</a></h3>
<p class="decl"><a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">Poco::Data::StatementImpl</a> * createStatementImpl();</p>
<div class="description">
<p>Returns an <a href="Poco.Data.SQLite.html" title="namespace Poco::Data::SQLite">SQLite</a> <a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>. </p>
</div>
<h3><a name="2025">isConnected</a></h3>
<p class="decl">bool isConnected();</p>
<div class="description">
<p>Returns true if and only if connected, false otherwise. </p>
</div>
<h3><a name="2024">isTransaction</a></h3>
<p class="decl">bool isTransaction();</p>
<div class="description">
<p>Returns true if and only if a transaction is in progress. </p>
</div>
<h3><a name="2022">rollback</a></h3>
<p class="decl">void rollback();</p>
<div class="description">
<p>Aborts a transaction. </p>
</div>
<h3><a name="2034">getMaxRetryAttempts</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> getMaxRetryAttempts(<br /> const std::string & prop<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2044">getMaxRetrySleep</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> getMaxRetrySleep(<br /> const std::string & prop<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2039">getMinRetrySleep</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> getMinRetrySleep(<br /> const std::string & prop<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2029">getTransactionMode</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> getTransactionMode(<br /> const std::string & prop<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2031">setMaxRetryAttempts</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setMaxRetryAttempts(<br /> const std::string & prop,<br /> const <a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> & value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2041">setMaxRetrySleep</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setMaxRetrySleep(<br /> const std::string & prop,<br /> const <a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> & value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2036">setMinRetrySleep</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setMinRetrySleep(<br /> const std::string & prop,<br /> const <a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> & value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="2026">setTransactionMode</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setTransactionMode(<br /> const std::string & prop,<br /> const <a href="Poco.Any.html" title="class Poco::Any">Poco::Any</a> & value<br />);</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>
</div>
</body>
</html>
|