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
|
<!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::StatementImpl</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.html" class="namespace">Poco::Data</a></h1>
<h1 class="symbol">class StatementImpl</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Data<br />
<b>Package:</b> DataCore<br />
<b>Header:</b> Poco/Data/StatementImpl.h</p>
<h2>Description</h2>
<div class="description">
<p><a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a> interface that subclasses must implement to define database dependent query execution. </p>
<p><a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>'s are noncopyable. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b><a href="Poco.RefCountedObject.html" title="class Poco::RefCountedObject">Poco::RefCountedObject</a></p>
<p><b>All Base Classes: </b><a href="Poco.RefCountedObject.html" title="class Poco::RefCountedObject">Poco::RefCountedObject</a></p>
<p><b>Known Derived Classes: </b><a href="Poco.Data.MySQL.MySQLStatementImpl.html" title="class Poco::Data::MySQL::MySQLStatementImpl">Poco::Data::MySQL::MySQLStatementImpl</a>, <a href="Poco.Data.ODBC.ODBCStatementImpl.html" title="class Poco::Data::ODBC::ODBCStatementImpl">Poco::Data::ODBC::ODBCStatementImpl</a>, <a href="Poco.Data.SQLite.SQLiteStatementImpl.html" title="class Poco::Data::SQLite::SQLiteStatementImpl">Poco::Data::SQLite::SQLiteStatementImpl</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Data.StatementImpl.html#3082" title="Poco::Data::StatementImpl::add()">add</a>, <a href="Poco.Data.StatementImpl.html#3084" title="Poco::Data::StatementImpl::addBinding()">addBinding</a>, <a href="Poco.Data.StatementImpl.html#3086" title="Poco::Data::StatementImpl::addExtract()">addExtract</a>, <a href="Poco.Data.StatementImpl.html#3103" title="Poco::Data::StatementImpl::bindImpl()">bindImpl</a>, <a href="Poco.Data.StatementImpl.html#3106" title="Poco::Data::StatementImpl::binder()">binder</a>, <a href="Poco.Data.StatementImpl.html#3108" title="Poco::Data::StatementImpl::bindings()">bindings</a>, <a href="Poco.Data.StatementImpl.html#3101" title="Poco::Data::StatementImpl::canBind()">canBind</a>, <a href="Poco.Data.StatementImpl.html#3107" title="Poco::Data::StatementImpl::columnsExtracted()">columnsExtracted</a>, <a href="Poco.Data.StatementImpl.html#3094" title="Poco::Data::StatementImpl::columnsReturned()">columnsReturned</a>, <a href="Poco.Data.StatementImpl.html#3102" title="Poco::Data::StatementImpl::compileImpl()">compileImpl</a>, <a href="Poco.Data.StatementImpl.html#3091" title="Poco::Data::StatementImpl::execute()">execute</a>, <a href="Poco.Data.StatementImpl.html#3105" title="Poco::Data::StatementImpl::extractions()">extractions</a>, <a href="Poco.Data.StatementImpl.html#3104" title="Poco::Data::StatementImpl::extractor()">extractor</a>, <a href="Poco.Data.StatementImpl.html#3093" title="Poco::Data::StatementImpl::getState()">getState</a>, <a href="Poco.Data.StatementImpl.html#3099" title="Poco::Data::StatementImpl::hasNext()">hasNext</a>, <a href="Poco.Data.StatementImpl.html#3111" title="Poco::Data::StatementImpl::makeExtractors()">makeExtractors</a>, <a href="Poco.Data.StatementImpl.html#3095" title="Poco::Data::StatementImpl::metaColumn()">metaColumn</a>, <a href="Poco.Data.StatementImpl.html#3100" title="Poco::Data::StatementImpl::next()">next</a>, <a href="Poco.Data.StatementImpl.html#3092" title="Poco::Data::StatementImpl::reset()">reset</a>, <a href="Poco.Data.StatementImpl.html#3088" title="Poco::Data::StatementImpl::setExtractionLimit()">setExtractionLimit</a>, <a href="Poco.Data.StatementImpl.html#3090" title="Poco::Data::StatementImpl::toString()">toString</a></p>
<p><b>Inherited Functions: </b><a href="Poco.RefCountedObject.html#9659" title="Poco::RefCountedObject::duplicate()">duplicate</a>, <a href="Poco.RefCountedObject.html#9661" title="Poco::RefCountedObject::referenceCount()">referenceCount</a>, <a href="Poco.RefCountedObject.html#9660" title="Poco::RefCountedObject::release()">release</a></p>
<h2>Enumerations</h2>
<h3><a name="3074">State</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="3075">ST_INITIALIZED</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="3076">ST_COMPILED</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="3077">ST_BOUND</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="3078">ST_DONE</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="3079">ST_RESET</a></p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="3080">StatementImpl</a></h3>
<p class="decl"><a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>();</p>
<div class="description">
<p>Creates the <a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="3081">~StatementImpl</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="3082">add</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template < typename T > void add(<br /> const T & t<br />);</p>
<div class="description">
<p>Appends SQl statement (fragments). </p>
</div>
<h3><a name="3084">addBinding</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void addBinding(<br /> <a href="Poco.Data.AbstractBinding.html" title="class Poco::Data::AbstractBinding">AbstractBinding</a> * info<br />);</p>
<div class="description">
<p>Registers the <a href="Poco.Data.Binding.html" title="class Poco::Data::Binding">Binding</a> at the <a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>. </p>
</div>
<h3><a name="3086">addExtract</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void addExtract(<br /> <a href="Poco.Data.AbstractExtraction.html" title="class Poco::Data::AbstractExtraction">AbstractExtraction</a> * info<br />);</p>
<div class="description">
<p>Registers objects used for extracting data at the <a href="Poco.Data.StatementImpl.html" title="class Poco::Data::StatementImpl">StatementImpl</a>. </p>
</div>
<h3><a name="3091">execute</a></h3>
<p class="decl"><a href="Poco.html#11354" title="Poco::UInt32">Poco::UInt32</a> execute();</p>
<div class="description">
<p>Executes a statement. Returns the number of rows extracted. </p>
</div>
<h3><a name="3093">getState</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Data.StatementImpl.html#3074" title="enum Poco::Data::StatementImpl::State">State</a> getState() const;</p>
<div class="description">
<p>Returns the state of the <a href="Poco.Data.Statement.html" title="class Poco::Data::Statement">Statement</a>. </p>
</div>
<h3><a name="3092">reset</a></h3>
<p class="decl">void reset();</p>
<div class="description">
<p>Resets the statement, so that we can reuse all bindings and re-execute again. </p>
</div>
<h3><a name="3088">setExtractionLimit</a></h3>
<p class="decl">void setExtractionLimit(<br /> const <a href="Poco.Data.Limit.html" title="class Poco::Data::Limit">Limit</a> & extrLimit<br />);</p>
<div class="description">
<p>Changes the extractionLimit to extrLimit. Per default no limit (EXTRACT_UNLIMITED) is set. </p>
</div>
<h3><a name="3090">toString</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::string toString() const;</p>
<div class="description">
<p>Create a string version of the SQL statement. </p>
</div>
<h3><a name="3103">bindImpl</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void bindImpl() = 0;</p>
<div class="description">
<p>Binds parameters. </p>
</div>
<h3><a name="3106">binder</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual <a href="Poco.Data.AbstractBinder.html" title="class Poco::Data::AbstractBinder">AbstractBinder</a> & binder() = 0;</p>
<div class="description">
<p>Returns the concrete binder used by the statement. </p>
</div>
<h3><a name="3108">bindings</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const <a href="Poco.Data.html#2132" title="Poco::Data::AbstractBindingVec">AbstractBindingVec</a> & bindings() const;</p>
<div class="description">
<p>Returns the bindings. </p>
</div>
<h3><a name="3109">bindings</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Data.html#2132" title="Poco::Data::AbstractBindingVec">AbstractBindingVec</a> & bindings();</p>
<div class="description">
<p>Returns the bindings. </p>
</div>
<h3><a name="3101">canBind</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual bool canBind() const = 0;</p>
<div class="description">
<p>Returns if another bind is possible. </p>
</div>
<h3><a name="3107">columnsExtracted</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int columnsExtracted() const;</p>
<div class="description">
<p>Returns the number of columns that the extractors handle. </p>
</div>
<h3><a name="3094">columnsReturned</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual <a href="Poco.html#11354" title="Poco::UInt32">Poco::UInt32</a> columnsReturned() const = 0;</p>
<div class="description">
<p>Returns number of columns returned by query. </p>
</div>
<h3><a name="3102">compileImpl</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void compileImpl() = 0;</p>
<div class="description">
<p>Compiles the statement, doesn't bind yet. </p>
</div>
<h3><a name="3105">extractions</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const <a href="Poco.Data.html#2155" title="Poco::Data::AbstractExtractionVec">AbstractExtractionVec</a> & extractions() const;</p>
<div class="description">
<p>Returns the extractions vector. </p>
</div>
<h3><a name="3110">extractions</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Data.html#2155" title="Poco::Data::AbstractExtractionVec">AbstractExtractionVec</a> & extractions();</p>
<div class="description">
<p>Returns the extractions vector. </p>
</div>
<h3><a name="3104">extractor</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual <a href="Poco.Data.AbstractExtractor.html" title="class Poco::Data::AbstractExtractor">AbstractExtractor</a> & extractor() = 0;</p>
<div class="description">
<p>Returns the concrete extractor used by the statement. </p>
</div>
<h3><a name="3099">hasNext</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual bool hasNext() = 0;</p>
<div class="description">
<p>Returns true if a call to <a href="Poco.Data.StatementImpl.html#3100" title="Poco::Data::StatementImpl::next()">next</a>() will return data. </p>
<p>Note that the implementation must support several consecutive calls to hasNext without data getting lost, ie. <a href="Poco.Data.StatementImpl.html#3099" title="Poco::Data::StatementImpl::hasNext()">hasNext</a>(); <a href="Poco.Data.StatementImpl.html#3099" title="Poco::Data::StatementImpl::hasNext()">hasNext</a>(); <a href="Poco.Data.StatementImpl.html#3100" title="Poco::Data::StatementImpl::next()">next</a>() must be equal to <a href="Poco.Data.StatementImpl.html#3099" title="Poco::Data::StatementImpl::hasNext()">hasNext</a>(); <a href="Poco.Data.StatementImpl.html#3100" title="Poco::Data::StatementImpl::next()">next</a>(); </p>
</div>
<h3><a name="3111">makeExtractors</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void makeExtractors(<br /> <a href="Poco.html#11354" title="Poco::UInt32">Poco::UInt32</a> count<br />);</p>
<div class="description">
<p>Creates extraction vector. Used in case when there is data returned, but no extraction supplied externally. </p>
</div>
<h3><a name="3095">metaColumn</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual const <a href="Poco.Data.MetaColumn.html" title="class Poco::Data::MetaColumn">MetaColumn</a> & metaColumn(<br /> <a href="Poco.html#11354" title="Poco::UInt32">Poco::UInt32</a> pos<br />) const = 0;</p>
<div class="description">
<p>Returns column meta data. </p>
</div>
<h3><a name="3097">metaColumn</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const <a href="Poco.Data.MetaColumn.html" title="class Poco::Data::MetaColumn">MetaColumn</a> & metaColumn(<br /> const std::string & name<br />) const;</p>
<div class="description">
<p>Returns column meta data. </p>
</div>
<h3><a name="3100">next</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void next() = 0;</p>
<div class="description">
<p>Retrieves the next row from the resultset. </p>
<p>Will throw, if the resultset is empty. Expects the statement to be compiled and bound </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>
|