-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compatibility.html
312 lines (235 loc) · 11 KB
/
Compatibility.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2021-09-25
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20210925" />
<meta http-equiv="Content-Language" content="en" />
<title>JDBDT – Compatibility</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.5.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left">
<a href="./" id="bannerLeft">
<img src="images/jdbdt-logo.png" alt="JDBDT"/>
</a>
</div>
<div class="pull-right"> </div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2021-09-25
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 1.4.1
</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">JDBDT</li>
<li>
<a href="index.html" title="Home">
<span class="none"></span>
Home</a>
</li>
<li>
<a href="MIT_License.html" title="License">
<span class="none"></span>
License</a>
</li>
<li class="nav-header">Reference</li>
<li>
<a href="Facade.html" title="API facade">
<span class="none"></span>
API facade</a>
</li>
<li>
<a href="DB.html" title="Database handles">
<span class="none"></span>
Database handles</a>
</li>
<li>
<a href="DataSources.html" title="Data sources">
<span class="none"></span>
Data sources</a>
</li>
<li>
<a href="DataSets.html" title="Data sets">
<span class="none"></span>
Data sets</a>
</li>
<li>
<a href="DBSetup.html" title="Database setup">
<span class="none"></span>
Database setup</a>
</li>
<li>
<a href="DBAssertions.html" title="Assertions">
<span class="none"></span>
Assertions</a>
</li>
<li>
<a href="Logs.html" title="Logging format">
<span class="none"></span>
Logging format</a>
</li>
<li class="active">
<a href="#"><span class="none"></span>Compatibility</a>
</li>
<li>
<a href="apidocs/index.html" title="Javadoc">
<span class="none"></span>
Javadoc</a>
</li>
<li class="nav-header">Tutorial</li>
<li>
<a href="Tutorial.html" title="Guide">
<span class="none"></span>
Guide</a>
</li>
<li>
<a href="http://github.com/JDBDT/jdbdt-tutorial" class="externalLink" title="Code @ GitHub">
<span class="none"></span>
Code @ GitHub</a>
</li>
<li class="nav-header">Development</li>
<li>
<a href="http://search.maven.org/#search%7Cga%7C1%7Cjdbdt" class="externalLink" title="Maven Central">
<span class="none"></span>
Maven Central</a>
</li>
<li>
<a href="https://github.com/JDBDT/jdbdt/" class="externalLink" title="Source code">
<span class="none"></span>
Source code</a>
</li>
<li>
<a href="https://github.com/JDBDT/jdbdt/issues/" class="externalLink" title="Issue tracker">
<span class="none"></span>
Issue tracker</a>
</li>
<li>
<a href="https://travis-ci.org/JDBDT/jdbdt/" class="externalLink" title="Travis CI">
<span class="none"></span>
Travis CI</a>
</li>
<li>
<a href="https://ci.appveyor.com/project/edrdo/jdbdt" class="externalLink" title="AppVeyor CI">
<span class="none"></span>
AppVeyor CI</a>
</li>
<li>
<a href="https://sonarcloud.io/organizations/jdbdt/projects" class="externalLink" title="SonarCloud">
<span class="none"></span>
SonarCloud</a>
</li>
<li>
<a href="https://www.codefactor.io/repository/github/jdbdt/jdbdt" class="externalLink" title="CodeFactor">
<span class="none"></span>
CodeFactor</a>
</li>
<li>
<a href="project-info.html" title="Maven reports">
<span class="none"></span>
Maven reports</a>
</li>
<li>
<a href="Inception.html" title="Inception">
<span class="none"></span>
Inception</a>
</li>
</ul>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<h1>Compatibility</h1>
<p><a name="Drivers"></a></p>
<div class="section">
<h2><a name="JDBC_drivers"></a>JDBC drivers</h2>
<p>JDBDT is expected to work with any (sane) JDBC driver. The JDBDT build currently tests integration with:</p>
<ul>
<li><a class="externalLink" href="https://db.apache.org/derby">Derby</a></li>
<li><a class="externalLink" href="http://www.h2database.com">H2</a></li>
<li><a class="externalLink" href="http://hsqldb.org">HSQLDB</a></li>
<li><a class="externalLink" href="http://mysql.com">MySQL</a></li>
<li><a class="externalLink" href="http://postgresql.org">PostgreSQL</a></li>
<li><a class="externalLink" href="https://www.sqlite.org">SQLite</a> through <a class="externalLink" href="https://github.com/xerial/sqlite-jdbc">xerial’s JDBC driver</a></li>
</ul>
<p><a name="KnownIssues"></a></p></div>
<div class="section">
<h2><a name="Known_issues"></a>Known issues</h2>
<p><a name="KnownIssues_Derby"></a></p>
<div class="section">
<h3><a name="Derby"></a>Derby</h3>
<p>Derby does not support <tt>LIMIT</tt> in association to SQL queries, hence <tt>QueryBuilder.limit()</tt> should not be used.</p>
<p><a name="KnownIssues_PostgreSQL"></a></p></div>
<div class="section">
<h3><a name="PostgreSQL"></a>PostgreSQL</h3>
<p><b>Auto-commit off / Rollback on error</b></p>
<p>If auto-commit is turned <b>off</b> for the database connection and a SQL statement raises an error (e.g., an integrity constraint is violated during an insertion), PostgreSQL aborts the transaction and requires an explicit rollback execute further statements. This is a well known issue in PostgreSQL (e.g., see <a class="externalLink" href="http://postgresql.nabble.com/25P02-current-transaction-is-aborted-commands-ignored-until-end-of-transaction-block-td2174290.html">here</a>). When using JDBDT, this may affect tests that validate invalid uses of a database by the SUT: </p>
<div class="source">
<div class="source"><pre class="prettyprint"> try {
// at this point connection has autocommit turned off
call SUT, expecting it to throw a database exception, e.g.,
insert data that violates a primary key
fail("exception expected");
}
catch(SQLException e) {
assertXXX(...); // e.g. assertUnchanged(...)
}
</pre></div></div>
<p>The <tt>assertXXX</tt> JDBDT assertion above (or any other code that issues a database statement for that matter) will fail with the following message</p>
<div class="source">
<div class="source"><pre class="prettyprint">org.postgresql.util.PSQLException:
ERROR: current transaction is aborted, commands ignored until
end of transaction block
</pre></div></div>
<p>A possible workaround is to issue a rollback statement before any further operations, i.e., before <tt>assertXXX</tt> in the example snippet above.</p>
<p> <a name="KnownIssues_sqlite"></a></p></div>
<div class="section">
<h3><a name="sqlite"></a>sqlite</h3>
<p><b>Statement reuse</b></p>
<p><a href="DB.html#StatementReuse">Statement reuse should be disabled for xerial’s JDBC driver for sqlite</a>.</p>
<p><b>Table truncation is not supported</b></p>
<p><a class="externalLink" href="https://www.sqlite.org/lang.html">sqlite does not support <tt>TRUNCATE</tt> statements</a>, so <tt>JDBDT.truncate</tt> will not work.</p>
<p>** LIMIT clause not supported **</p>
<p>Derby does not support <tt>LIMIT</tt>, so <tt>QueryBuilder.limit()</tt> will not work.</p></div></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p >Copyright © 2016–2021
<a href="http://jdbdt.org">JDBDT</a>.
All rights reserved.
</p>
</div>
</div>
</footer>
</body>
</html>