Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/sql/kernel/qsqlcachedresult.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||||||||||||||||||||
2 | ** | - | ||||||||||||||||||||||||
3 | ** Copyright (C) 2015 The Qt Company Ltd. | - | ||||||||||||||||||||||||
4 | ** Contact: http://www.qt.io/licensing/ | - | ||||||||||||||||||||||||
5 | ** | - | ||||||||||||||||||||||||
6 | ** This file is part of the QtSql module of the Qt Toolkit. | - | ||||||||||||||||||||||||
7 | ** | - | ||||||||||||||||||||||||
8 | ** $QT_BEGIN_LICENSE:LGPL21$ | - | ||||||||||||||||||||||||
9 | ** Commercial License Usage | - | ||||||||||||||||||||||||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||||||||||||||
11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||||||||||||||
12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||||||||||||||
13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||||||||||||||
14 | ** and conditions see http://www.qt.io/terms-conditions. For further | - | ||||||||||||||||||||||||
15 | ** information use the contact form at http://www.qt.io/contact-us. | - | ||||||||||||||||||||||||
16 | ** | - | ||||||||||||||||||||||||
17 | ** GNU Lesser General Public License Usage | - | ||||||||||||||||||||||||
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||||||||||||||
19 | ** General Public License version 2.1 or version 3 as published by the Free | - | ||||||||||||||||||||||||
20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | - | ||||||||||||||||||||||||
21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | - | ||||||||||||||||||||||||
22 | ** following information to ensure the GNU Lesser General Public License | - | ||||||||||||||||||||||||
23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | - | ||||||||||||||||||||||||
24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - | ||||||||||||||||||||||||
25 | ** | - | ||||||||||||||||||||||||
26 | ** As a special exception, The Qt Company gives you certain additional | - | ||||||||||||||||||||||||
27 | ** rights. These rights are described in The Qt Company LGPL Exception | - | ||||||||||||||||||||||||
28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - | ||||||||||||||||||||||||
29 | ** | - | ||||||||||||||||||||||||
30 | ** $QT_END_LICENSE$ | - | ||||||||||||||||||||||||
31 | ** | - | ||||||||||||||||||||||||
32 | ****************************************************************************/ | - | ||||||||||||||||||||||||
33 | - | |||||||||||||||||||||||||
34 | #include "private/qsqlcachedresult_p.h" | - | ||||||||||||||||||||||||
35 | - | |||||||||||||||||||||||||
36 | #include <qvariant.h> | - | ||||||||||||||||||||||||
37 | #include <qdatetime.h> | - | ||||||||||||||||||||||||
38 | #include <qvector.h> | - | ||||||||||||||||||||||||
39 | - | |||||||||||||||||||||||||
40 | QT_BEGIN_NAMESPACE | - | ||||||||||||||||||||||||
41 | - | |||||||||||||||||||||||||
42 | /* | - | ||||||||||||||||||||||||
43 | QSqlCachedResult is a convenience class for databases that only allow | - | ||||||||||||||||||||||||
44 | forward only fetching. It will cache all the results so we can iterate | - | ||||||||||||||||||||||||
45 | backwards over the results again. | - | ||||||||||||||||||||||||
46 | - | |||||||||||||||||||||||||
47 | All you need to do is to inherit from QSqlCachedResult and reimplement | - | ||||||||||||||||||||||||
48 | gotoNext(). gotoNext() will have a reference to the internal cache and | - | ||||||||||||||||||||||||
49 | will give you an index where you can start filling in your data. Special | - | ||||||||||||||||||||||||
50 | case: If the user actually wants a forward-only query, idx will be -1 | - | ||||||||||||||||||||||||
51 | to indicate that we are not interested in the actual values. | - | ||||||||||||||||||||||||
52 | */ | - | ||||||||||||||||||||||||
53 | - | |||||||||||||||||||||||||
54 | static const uint initial_cache_size = 128; | - | ||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||
56 | class QSqlCachedResultPrivate | - | ||||||||||||||||||||||||
57 | { | - | ||||||||||||||||||||||||
58 | public: | - | ||||||||||||||||||||||||
59 | QSqlCachedResultPrivate(); | - | ||||||||||||||||||||||||
60 | bool canSeek(int i) const; | - | ||||||||||||||||||||||||
61 | inline int cacheCount() const; | - | ||||||||||||||||||||||||
62 | void init(int count, bool fo); | - | ||||||||||||||||||||||||
63 | void cleanup(); | - | ||||||||||||||||||||||||
64 | int nextIndex(); | - | ||||||||||||||||||||||||
65 | void revertLast(); | - | ||||||||||||||||||||||||
66 | - | |||||||||||||||||||||||||
67 | QSqlCachedResult::ValueCache cache; | - | ||||||||||||||||||||||||
68 | int rowCacheEnd; | - | ||||||||||||||||||||||||
69 | int colCount; | - | ||||||||||||||||||||||||
70 | bool forwardOnly; | - | ||||||||||||||||||||||||
71 | bool atEnd; | - | ||||||||||||||||||||||||
72 | }; | - | ||||||||||||||||||||||||
73 | - | |||||||||||||||||||||||||
74 | QSqlCachedResultPrivate::QSqlCachedResultPrivate(): | - | ||||||||||||||||||||||||
75 | rowCacheEnd(0), colCount(0), forwardOnly(false), atEnd(false) | - | ||||||||||||||||||||||||
76 | { | - | ||||||||||||||||||||||||
77 | } executed 1932 times by 9 tests: end of block Executed by:
| 1932 | ||||||||||||||||||||||||
78 | - | |||||||||||||||||||||||||
79 | void QSqlCachedResultPrivate::cleanup() | - | ||||||||||||||||||||||||
80 | { | - | ||||||||||||||||||||||||
81 | cache.clear(); | - | ||||||||||||||||||||||||
82 | forwardOnly = false; | - | ||||||||||||||||||||||||
83 | atEnd = false; | - | ||||||||||||||||||||||||
84 | colCount = 0; | - | ||||||||||||||||||||||||
85 | rowCacheEnd = 0; | - | ||||||||||||||||||||||||
86 | } executed 8645 times by 9 tests: end of block Executed by:
| 8645 | ||||||||||||||||||||||||
87 | - | |||||||||||||||||||||||||
88 | void QSqlCachedResultPrivate::init(int count, bool fo) | - | ||||||||||||||||||||||||
89 | { | - | ||||||||||||||||||||||||
90 | Q_ASSERT(count); | - | ||||||||||||||||||||||||
91 | cleanup(); | - | ||||||||||||||||||||||||
92 | forwardOnly = fo; | - | ||||||||||||||||||||||||
93 | colCount = count; | - | ||||||||||||||||||||||||
94 | if (fo) {
| 486-639 | ||||||||||||||||||||||||
95 | cache.resize(count); | - | ||||||||||||||||||||||||
96 | rowCacheEnd = count; | - | ||||||||||||||||||||||||
97 | } else { executed 639 times by 9 tests: end of block Executed by:
| 639 | ||||||||||||||||||||||||
98 | cache.resize(initial_cache_size * count); | - | ||||||||||||||||||||||||
99 | } executed 486 times by 8 tests: end of block Executed by:
| 486 | ||||||||||||||||||||||||
100 | } | - | ||||||||||||||||||||||||
101 | - | |||||||||||||||||||||||||
102 | int QSqlCachedResultPrivate::nextIndex() | - | ||||||||||||||||||||||||
103 | { | - | ||||||||||||||||||||||||
104 | if (forwardOnly)
| 2238-34600 | ||||||||||||||||||||||||
105 | return 0; executed 2238 times by 8 tests: return 0; Executed by:
| 2238 | ||||||||||||||||||||||||
106 | int newIdx = rowCacheEnd; | - | ||||||||||||||||||||||||
107 | if (newIdx + colCount > cache.size())
| 244-34356 | ||||||||||||||||||||||||
108 | cache.resize(qMin(cache.size() * 2, cache.size() + 10000)); executed 244 times by 3 tests: cache.resize(qMin(cache.size() * 2, cache.size() + 10000)); Executed by:
| 244 | ||||||||||||||||||||||||
109 | rowCacheEnd += colCount; | - | ||||||||||||||||||||||||
110 | - | |||||||||||||||||||||||||
111 | return newIdx; executed 34600 times by 8 tests: return newIdx; Executed by:
| 34600 | ||||||||||||||||||||||||
112 | } | - | ||||||||||||||||||||||||
113 | - | |||||||||||||||||||||||||
114 | bool QSqlCachedResultPrivate::canSeek(int i) const | - | ||||||||||||||||||||||||
115 | { | - | ||||||||||||||||||||||||
116 | if (forwardOnly || i < 0)
| 0-3389 | ||||||||||||||||||||||||
117 | return false; executed 2239 times by 8 tests: return false; Executed by:
| 2239 | ||||||||||||||||||||||||
118 | return rowCacheEnd >= (i + 1) * colCount; executed 3389 times by 8 tests: return rowCacheEnd >= (i + 1) * colCount; Executed by:
| 3389 | ||||||||||||||||||||||||
119 | } | - | ||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||
121 | void QSqlCachedResultPrivate::revertLast() | - | ||||||||||||||||||||||||
122 | { | - | ||||||||||||||||||||||||
123 | if (forwardOnly)
| 280-558 | ||||||||||||||||||||||||
124 | return; executed 558 times by 8 tests: return; Executed by:
| 558 | ||||||||||||||||||||||||
125 | rowCacheEnd -= colCount; | - | ||||||||||||||||||||||||
126 | } executed 280 times by 6 tests: end of block Executed by:
| 280 | ||||||||||||||||||||||||
127 | - | |||||||||||||||||||||||||
128 | inline int QSqlCachedResultPrivate::cacheCount() const | - | ||||||||||||||||||||||||
129 | { | - | ||||||||||||||||||||||||
130 | Q_ASSERT(!forwardOnly); | - | ||||||||||||||||||||||||
131 | Q_ASSERT(colCount); | - | ||||||||||||||||||||||||
132 | return rowCacheEnd / colCount; executed 17 times by 3 tests: return rowCacheEnd / colCount; Executed by:
| 17 | ||||||||||||||||||||||||
133 | } | - | ||||||||||||||||||||||||
134 | - | |||||||||||||||||||||||||
135 | ////////////// | - | ||||||||||||||||||||||||
136 | - | |||||||||||||||||||||||||
137 | QSqlCachedResult::QSqlCachedResult(const QSqlDriver * db): QSqlResult (db) | - | ||||||||||||||||||||||||
138 | { | - | ||||||||||||||||||||||||
139 | d = new QSqlCachedResultPrivate(); | - | ||||||||||||||||||||||||
140 | } executed 1932 times by 9 tests: end of block Executed by:
| 1932 | ||||||||||||||||||||||||
141 | - | |||||||||||||||||||||||||
142 | QSqlCachedResult::~QSqlCachedResult() | - | ||||||||||||||||||||||||
143 | { | - | ||||||||||||||||||||||||
144 | delete d; | - | ||||||||||||||||||||||||
145 | } executed 1932 times by 9 tests: end of block Executed by:
| 1932 | ||||||||||||||||||||||||
146 | - | |||||||||||||||||||||||||
147 | void QSqlCachedResult::init(int colCount) | - | ||||||||||||||||||||||||
148 | { | - | ||||||||||||||||||||||||
149 | d->init(colCount, isForwardOnly()); | - | ||||||||||||||||||||||||
150 | } executed 1125 times by 9 tests: end of block Executed by:
| 1125 | ||||||||||||||||||||||||
151 | - | |||||||||||||||||||||||||
152 | bool QSqlCachedResult::fetch(int i) | - | ||||||||||||||||||||||||
153 | { | - | ||||||||||||||||||||||||
154 | if ((!isActive()) || (i < 0))
| 0-2662 | ||||||||||||||||||||||||
155 | return false; executed 2 times by 1 test: return false; Executed by:
| 2 | ||||||||||||||||||||||||
156 | if (at() == i)
| 944-1716 | ||||||||||||||||||||||||
157 | return true; executed 1716 times by 5 tests: return true; Executed by:
| 1716 | ||||||||||||||||||||||||
158 | if (d->forwardOnly) {
| 1-943 | ||||||||||||||||||||||||
159 | // speed hack - do not copy values if not needed | - | ||||||||||||||||||||||||
160 | if (at() > i || at() == QSql::AfterLastRow)
| 0-1 | ||||||||||||||||||||||||
161 | return false; never executed: return false; | 0 | ||||||||||||||||||||||||
162 | while(at() < i - 1) {
| 1-3 | ||||||||||||||||||||||||
163 | if (!gotoNext(d->cache, -1))
| 0-3 | ||||||||||||||||||||||||
164 | return false; never executed: return false; | 0 | ||||||||||||||||||||||||
165 | setAt(at() + 1); | - | ||||||||||||||||||||||||
166 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||
167 | if (!gotoNext(d->cache, 0))
| 0-1 | ||||||||||||||||||||||||
168 | return false; never executed: return false; | 0 | ||||||||||||||||||||||||
169 | setAt(at() + 1); | - | ||||||||||||||||||||||||
170 | return true; executed 1 time by 1 test: return true; Executed by:
| 1 | ||||||||||||||||||||||||
171 | } | - | ||||||||||||||||||||||||
172 | if (d->canSeek(i)) {
| 404-539 | ||||||||||||||||||||||||
173 | setAt(i); | - | ||||||||||||||||||||||||
174 | return true; executed 539 times by 5 tests: return true; Executed by:
| 539 | ||||||||||||||||||||||||
175 | } | - | ||||||||||||||||||||||||
176 | if (d->rowCacheEnd > 0)
| 13-391 | ||||||||||||||||||||||||
177 | setAt(d->cacheCount()); executed 13 times by 3 tests: setAt(d->cacheCount()); Executed by:
| 13 | ||||||||||||||||||||||||
178 | while (at() < i + 1) {
| 132-34438 | ||||||||||||||||||||||||
179 | if (!cacheNext()) {
| 272-34166 | ||||||||||||||||||||||||
180 | if (d->canSeek(i))
| 2-270 | ||||||||||||||||||||||||
181 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||
182 | return false; executed 270 times by 5 tests: return false; Executed by:
| 270 | ||||||||||||||||||||||||
183 | } | - | ||||||||||||||||||||||||
184 | } executed 34166 times by 5 tests: end of block Executed by:
| 34166 | ||||||||||||||||||||||||
185 | setAt(i); | - | ||||||||||||||||||||||||
186 | - | |||||||||||||||||||||||||
187 | return true; executed 134 times by 4 tests: return true; Executed by:
| 134 | ||||||||||||||||||||||||
188 | } | - | ||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||
190 | bool QSqlCachedResult::fetchNext() | - | ||||||||||||||||||||||||
191 | { | - | ||||||||||||||||||||||||
192 | if (d->canSeek(at() + 1)) {
| 1750-1959 | ||||||||||||||||||||||||
193 | setAt(at() + 1); | - | ||||||||||||||||||||||||
194 | return true; executed 1750 times by 5 tests: return true; Executed by:
| 1750 | ||||||||||||||||||||||||
195 | } | - | ||||||||||||||||||||||||
196 | return cacheNext(); executed 1959 times by 8 tests: return cacheNext(); Executed by:
| 1959 | ||||||||||||||||||||||||
197 | } | - | ||||||||||||||||||||||||
198 | - | |||||||||||||||||||||||||
199 | bool QSqlCachedResult::fetchPrevious() | - | ||||||||||||||||||||||||
200 | { | - | ||||||||||||||||||||||||
201 | return fetch(at() - 1); executed 40 times by 3 tests: return fetch(at() - 1); Executed by:
| 40 | ||||||||||||||||||||||||
202 | } | - | ||||||||||||||||||||||||
203 | - | |||||||||||||||||||||||||
204 | bool QSqlCachedResult::fetchFirst() | - | ||||||||||||||||||||||||
205 | { | - | ||||||||||||||||||||||||
206 | if (d->forwardOnly && at() != QSql::BeforeFirstRow) {
| 0-615 | ||||||||||||||||||||||||
207 | return false; never executed: return false; | 0 | ||||||||||||||||||||||||
208 | } | - | ||||||||||||||||||||||||
209 | if (d->canSeek(0)) {
| 1-703 | ||||||||||||||||||||||||
210 | setAt(0); | - | ||||||||||||||||||||||||
211 | return true; executed 1 time by 1 test: return true; Executed by:
| 1 | ||||||||||||||||||||||||
212 | } | - | ||||||||||||||||||||||||
213 | return cacheNext(); executed 703 times by 8 tests: return cacheNext(); Executed by:
| 703 | ||||||||||||||||||||||||
214 | } | - | ||||||||||||||||||||||||
215 | - | |||||||||||||||||||||||||
216 | bool QSqlCachedResult::fetchLast() | - | ||||||||||||||||||||||||
217 | { | - | ||||||||||||||||||||||||
218 | if (d->atEnd) {
| 4-6 | ||||||||||||||||||||||||
219 | if (d->forwardOnly)
| 0-4 | ||||||||||||||||||||||||
220 | return false; never executed: return false; | 0 | ||||||||||||||||||||||||
221 | else | - | ||||||||||||||||||||||||
222 | return fetch(d->cacheCount() - 1); executed 4 times by 1 test: return fetch(d->cacheCount() - 1); Executed by:
| 4 | ||||||||||||||||||||||||
223 | } | - | ||||||||||||||||||||||||
224 | - | |||||||||||||||||||||||||
225 | int i = at(); | - | ||||||||||||||||||||||||
226 | while (fetchNext())
| 6-22 | ||||||||||||||||||||||||
227 | ++i; /* brute force */ executed 22 times by 1 test: ++i; Executed by:
| 22 | ||||||||||||||||||||||||
228 | if (d->forwardOnly && at() == QSql::AfterLastRow) {
| 0-4 | ||||||||||||||||||||||||
229 | setAt(i); | - | ||||||||||||||||||||||||
230 | return true; executed 2 times by 1 test: return true; Executed by:
| 2 | ||||||||||||||||||||||||
231 | } else { | - | ||||||||||||||||||||||||
232 | return fetch(i); executed 4 times by 1 test: return fetch(i); Executed by:
| 4 | ||||||||||||||||||||||||
233 | } | - | ||||||||||||||||||||||||
234 | } | - | ||||||||||||||||||||||||
235 | - | |||||||||||||||||||||||||
236 | QVariant QSqlCachedResult::data(int i) | - | ||||||||||||||||||||||||
237 | { | - | ||||||||||||||||||||||||
238 | int idx = d->forwardOnly ? i : at() * d->colCount + i;
| 3492-5650 | ||||||||||||||||||||||||
239 | if (i >= d->colCount || i < 0 || at() < 0 || idx >= d->rowCacheEnd)
| 0-9142 | ||||||||||||||||||||||||
240 | return QVariant(); never executed: return QVariant(); | 0 | ||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||
242 | return d->cache.at(idx); executed 9142 times by 8 tests: return d->cache.at(idx); Executed by:
| 9142 | ||||||||||||||||||||||||
243 | } | - | ||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||
245 | bool QSqlCachedResult::isNull(int i) | - | ||||||||||||||||||||||||
246 | { | - | ||||||||||||||||||||||||
247 | int idx = d->forwardOnly ? i : at() * d->colCount + i;
| 0-10 | ||||||||||||||||||||||||
248 | if (i >= d->colCount || i < 0 || at() < 0 || idx >= d->rowCacheEnd)
| 0-9 | ||||||||||||||||||||||||
249 | return true; executed 1 time by 1 test: return true; Executed by:
| 1 | ||||||||||||||||||||||||
250 | - | |||||||||||||||||||||||||
251 | return d->cache.at(idx).isNull(); executed 9 times by 1 test: return d->cache.at(idx).isNull(); Executed by:
| 9 | ||||||||||||||||||||||||
252 | } | - | ||||||||||||||||||||||||
253 | - | |||||||||||||||||||||||||
254 | void QSqlCachedResult::cleanup() | - | ||||||||||||||||||||||||
255 | { | - | ||||||||||||||||||||||||
256 | setAt(QSql::BeforeFirstRow); | - | ||||||||||||||||||||||||
257 | setActive(false); | - | ||||||||||||||||||||||||
258 | d->cleanup(); | - | ||||||||||||||||||||||||
259 | } executed 7520 times by 9 tests: end of block Executed by:
| 7520 | ||||||||||||||||||||||||
260 | - | |||||||||||||||||||||||||
261 | void QSqlCachedResult::clearValues() | - | ||||||||||||||||||||||||
262 | { | - | ||||||||||||||||||||||||
263 | setAt(QSql::BeforeFirstRow); | - | ||||||||||||||||||||||||
264 | d->rowCacheEnd = 0; | - | ||||||||||||||||||||||||
265 | d->atEnd = false; | - | ||||||||||||||||||||||||
266 | } executed 119114 times by 9 tests: end of block Executed by:
| 119114 | ||||||||||||||||||||||||
267 | - | |||||||||||||||||||||||||
268 | bool QSqlCachedResult::cacheNext() | - | ||||||||||||||||||||||||
269 | { | - | ||||||||||||||||||||||||
270 | if (d->atEnd)
| 262-36838 | ||||||||||||||||||||||||
271 | return false; executed 262 times by 5 tests: return false; Executed by:
| 262 | ||||||||||||||||||||||||
272 | - | |||||||||||||||||||||||||
273 | if(isForwardOnly()) {
| 2238-34600 | ||||||||||||||||||||||||
274 | d->cache.clear(); | - | ||||||||||||||||||||||||
275 | d->cache.resize(d->colCount); | - | ||||||||||||||||||||||||
276 | } executed 2238 times by 8 tests: end of block Executed by:
| 2238 | ||||||||||||||||||||||||
277 | - | |||||||||||||||||||||||||
278 | if (!gotoNext(d->cache, d->nextIndex())) {
| 838-36000 | ||||||||||||||||||||||||
279 | d->revertLast(); | - | ||||||||||||||||||||||||
280 | d->atEnd = true; | - | ||||||||||||||||||||||||
281 | return false; executed 838 times by 8 tests: return false; Executed by:
| 838 | ||||||||||||||||||||||||
282 | } | - | ||||||||||||||||||||||||
283 | setAt(at() + 1); | - | ||||||||||||||||||||||||
284 | return true; executed 36000 times by 8 tests: return true; Executed by:
| 36000 | ||||||||||||||||||||||||
285 | } | - | ||||||||||||||||||||||||
286 | - | |||||||||||||||||||||||||
287 | int QSqlCachedResult::colCount() const | - | ||||||||||||||||||||||||
288 | { | - | ||||||||||||||||||||||||
289 | return d->colCount; never executed: return d->colCount; | 0 | ||||||||||||||||||||||||
290 | } | - | ||||||||||||||||||||||||
291 | - | |||||||||||||||||||||||||
292 | QSqlCachedResult::ValueCache &QSqlCachedResult::cache() | - | ||||||||||||||||||||||||
293 | { | - | ||||||||||||||||||||||||
294 | return d->cache; never executed: return d->cache; | 0 | ||||||||||||||||||||||||
295 | } | - | ||||||||||||||||||||||||
296 | - | |||||||||||||||||||||||||
297 | void QSqlCachedResult::virtual_hook(int id, void *data) | - | ||||||||||||||||||||||||
298 | { | - | ||||||||||||||||||||||||
299 | QSqlResult::virtual_hook(id, data); | - | ||||||||||||||||||||||||
300 | } never executed: end of block | 0 | ||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||
302 | void QSqlCachedResult::detachFromResultSet() | - | ||||||||||||||||||||||||
303 | { | - | ||||||||||||||||||||||||
304 | cleanup(); | - | ||||||||||||||||||||||||
305 | } never executed: end of block | 0 | ||||||||||||||||||||||||
306 | - | |||||||||||||||||||||||||
307 | void QSqlCachedResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy) | - | ||||||||||||||||||||||||
308 | { | - | ||||||||||||||||||||||||
309 | QSqlResult::setNumericalPrecisionPolicy(policy); | - | ||||||||||||||||||||||||
310 | cleanup(); | - | ||||||||||||||||||||||||
311 | } executed 2797 times by 9 tests: end of block Executed by:
| 2797 | ||||||||||||||||||||||||
312 | - | |||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||
314 | QT_END_NAMESPACE | - | ||||||||||||||||||||||||
Source code | Switch to Preprocessed file |