DataAccess.java

1
/*******************************************************************************
2
 * Copyhacked (H) 2012-2025.
3
 * This program and the accompanying materials
4
 * are made available under no term at all, use it like
5
 * you want, but share and discuss it
6
 * every time possible with every body.
7
 * 
8
 * Contributors:
9
 *      ron190 at ymail dot com - initial implementation
10
 ******************************************************************************/
11
package com.jsql.model.accessible;
12
13
import com.jsql.model.InjectionModel;
14
import com.jsql.model.bean.database.*;
15
import com.jsql.model.suspendable.Input;
16
import com.jsql.view.subscriber.Seal;
17
import com.jsql.model.exception.AbstractSlidingException;
18
import com.jsql.model.exception.InjectionFailureException;
19
import com.jsql.model.exception.JSqlException;
20
import com.jsql.model.suspendable.SuspendableGetRows;
21
import com.jsql.util.I18nUtil;
22
import com.jsql.util.LogLevelUtil;
23
import org.apache.commons.lang3.StringUtils;
24
import org.apache.logging.log4j.LogManager;
25
import org.apache.logging.log4j.Logger;
26
27
import java.util.ArrayList;
28
import java.util.List;
29
import java.util.regex.Pattern;
30
31
/**
32
 * Database resource object to read name of databases, tables, columns and values
33
 * using most suited injection strategy.
34
 */
35
public class DataAccess {
36
    
37
    private static final Logger LOGGER = LogManager.getRootLogger();
38
    
39
    /**
40
     * Regex characters marking the end of the result of an injection.
41
     * Process stops when this schema is encountered:
42
     * <pre>SQLix01x03x03x07
43
     */
44
    public static final String TRAIL_RGX = "\\x01\\x03\\x03\\x07";
45
    
46
    /**
47
     * Regex character used between each table cells.
48
     * Expected schema of multiple table cells :
49
     * <pre>
50
     * x04[table cell]x05[number of occurrences]x04x06x04[table cell]x05[number of occurrences]x04
51
     */
52
    public static final String SEPARATOR_CELL_RGX = "\\x06";
53
    
54
    /**
55
     * Regex character used between the table cell and the number of occurrence of the cell text.
56
     * Expected schema of a table cell data is
57
     * <pre>x04[table cell]x05[number of occurrences]x04
58
     */
59
    public static final String SEPARATOR_QTE_RGX = "\\x05";
60
61
    /**
62
     * Regex character enclosing a table cell returned by injection.
63
     * It allows to detect the correct end of a table cell data during parsing.
64
     * Expected schema of a table cell data is
65
     * <pre>x04[table cell]x05[number of occurrences]x04
66
     */
67
    public static final String ENCLOSE_VALUE_RGX = "\\x04";
68
    
69
    public static final String LEAD = "SqLi";
70
    public static final String SHELL_LEAD = "${shell.lead}";
71
    public static final String TRAIL = "iLQS";
72
    public static final String SHELL_TRAIL = "${shell.trail}";
73
    
74
    /**
75
     * Regex keywords corresponding to multiline and case-insensitive match.
76
     */
77
    public static final String MODE = "(?si)";
78
    
79
    /**
80
     * Regex schema describing a table cell with firstly the cell content and secondly the number of occurrences
81
     * of the cell text, separated by the reserved character x05 in hexadecimal.
82
     * The range of characters from x01 to x1F are not printable ASCII characters used to parse the data and exclude
83
     * printable characters during parsing.
84
     * Expected schema of a table cell data is
85
     * <pre>x04[table cell]x05[number of occurrences]x04
86
     */
87
    public static final String CELL_TABLE = "([^\\x01-\\x09\\x0B-\\x0C\\x0E-\\x1F]*)"+ DataAccess.SEPARATOR_QTE_RGX +"([^\\x01-\\x09\\x0B-\\x0C\\x0E-\\x1F]*)(\\x08)?";
88
89
    private final InjectionModel injectionModel;
90
    
91
    public DataAccess(InjectionModel injectionModel) {
92
        this.injectionModel = injectionModel;
93
    }
94
    
95
    /**
96
     * Get general database information.<br>
97
     * => version{%}database{%}user{%}CURRENT_USER
98
     */
99
    public void getDatabaseInfos() {
100
        LOGGER.log(LogLevelUtil.CONSOLE_DEFAULT, () -> I18nUtil.valueByKey("LOG_FETCHING_INFORMATIONS"));
101
        
102
        var sourcePage = new String[]{ StringUtils.EMPTY };
103
104
        var resultToParse = StringUtils.EMPTY;
105
        try {
106
            resultToParse = new SuspendableGetRows(this.injectionModel).run(new Input(
107
                this.injectionModel.getMediatorEngine().getEngine().instance().sqlInfos(),
108
                sourcePage,
109
                false,
110
                0,
111
                MockElement.MOCK,
112
                "metadata"
113
            ));
114
        } catch (AbstractSlidingException e) {
115
            resultToParse = DataAccess.getPartialResultAndLog(e, resultToParse);
116
        } catch (Exception e) {  // Catch all exceptions but prevent detecting bug
117
            LOGGER.log(LogLevelUtil.CONSOLE_ERROR, e.getMessage(), e);
118
        }
119
120 1 1. getDatabaseInfos : negated conditional → NO_COVERAGE
        if (StringUtils.isEmpty(resultToParse)) {
121 1 1. getDatabaseInfos : removed call to com/jsql/model/InjectionModel::sendResponseFromSite → NO_COVERAGE
            this.injectionModel.sendResponseFromSite("Incorrect metadata", sourcePage[0].trim());
122
        }
123
        
124
        try {
125
            String versionDatabase = resultToParse.split(DataAccess.ENCLOSE_VALUE_RGX)[0].replaceAll("\\s+", StringUtils.SPACE);
126
            String nameDatabase = resultToParse.split(DataAccess.ENCLOSE_VALUE_RGX)[1];
127
            String username = resultToParse.split(DataAccess.ENCLOSE_VALUE_RGX)[2];
128
129
            var infos = String.format(
130
                "Database [%s] on %s [%s] for user [%s]",
131
                nameDatabase,
132
                this.injectionModel.getMediatorEngine().getEngine(),
133
                versionDatabase,
134
                username
135
            );
136
            LOGGER.log(LogLevelUtil.CONSOLE_SUCCESS, infos);
137
        } catch (ArrayIndexOutOfBoundsException e) {
138
            LOGGER.log(
139
                LogLevelUtil.CONSOLE_ERROR,
140
                String.format("%s: %s", I18nUtil.valueByKey("LOG_DB_METADATA_INCORRECT"), resultToParse)
141
            );
142
            LOGGER.log(LogLevelUtil.CONSOLE_INFORM, I18nUtil.valueByKey("LOG_DB_METADATA_WARN"));
143
        }
144
    }
145
146
    /**
147
     * Get database names and table counts and send them to the view.<br>
148
     * Use readable text (not hexa) and parse this pattern:<br>
149
     * => hh[database name 1]jj[table count]hhgghh[database name 2]jj[table count]hhggh...hi<br>
150
     * Data window can be cut before the end of the request but the process helps to obtain
151
     * the rest of the unreachable data. The process can be interrupted by the user (stop/pause).
152
     * @return list of databases found
153
     * @throws JSqlException when injection failure or stopped by user
154
     */
155
    public List<Database> listDatabases() throws JSqlException {
156
        LOGGER.log(LogLevelUtil.CONSOLE_DEFAULT, () -> I18nUtil.valueByKey("LOG_FETCHING_DATABASES"));
157
        List<Database> databases = new ArrayList<>();
158
        String resultToParse = StringUtils.EMPTY;
159
        
160
        try {
161
            var sourcePage = new String[]{ StringUtils.EMPTY };
162
            resultToParse = new SuspendableGetRows(this.injectionModel).run(new Input(
163
                this.injectionModel.getMediatorEngine().getEngine().instance().sqlDatabases(),
164
                sourcePage,
165
                true,
166
                0,
167
                MockElement.MOCK,
168
                "databases"
169
            ));
170
        } catch (AbstractSlidingException e) {
171
            resultToParse = DataAccess.getPartialResultAndLog(e, resultToParse);
172
        } catch (Exception e) {  // Catch all exceptions but prevent detecting bug
173
            LOGGER.log(LogLevelUtil.CONSOLE_ERROR, e.getMessage(), e);
174
        }
175
176
        // Parse all data we have retrieved
177
        var regexSearch = Pattern.compile(
178
                DataAccess.MODE
179
                + DataAccess.ENCLOSE_VALUE_RGX
180
                + DataAccess.CELL_TABLE
181
                + DataAccess.ENCLOSE_VALUE_RGX
182
            )
183
            .matcher(resultToParse);
184 1 1. listDatabases : negated conditional → NO_COVERAGE
        if (!regexSearch.find()) {
185
            throw new InjectionFailureException("No match while injecting databases");
186
        }
187
        
188
        regexSearch.reset();
189
        // Build an array of Database objects from the data we have parsed
190 1 1. listDatabases : negated conditional → NO_COVERAGE
        while (regexSearch.find()) {
191
            String databaseName = regexSearch.group(1);
192
            String tableCount = regexSearch.group(2);
193
194
            var newDatabase = new Database(databaseName, tableCount);
195
            databases.add(newDatabase);
196
        }
197
198 1 1. listDatabases : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.AddDatabases(databases));
199 1 1. listDatabases : replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::listDatabases → NO_COVERAGE
        return databases;
200
    }
201
202
    /**
203
     * Get tables name and row count and send them to the view.<br>
204
     * Use readable text (not hexa) and parse this pattern:<br>
205
     * => hh[table name 1]jj[rows count]hhgghh[table name 2]jj[rows count]hhggh...hi<br>
206
     * Data window can be cut before the end of the request but the process helps to obtain
207
     * the rest of the unreachable data. The process can be interrupted by the user (stop/pause).
208
     * @param database which contains tables to find
209
     * @return list of tables found
210
     * @throws JSqlException when injection failure or stopped by user
211
     */
212
    public List<Table> listTables(Database database) throws JSqlException {
213
        // Reset stoppedByUser if list of Databases is partial
214
        // and some Tables are still reachable
215 1 1. listTables : removed call to com/jsql/model/InjectionModel::setIsStoppedByUser → NO_COVERAGE
        this.injectionModel.setIsStoppedByUser(false);
216
        
217
        // Inform the view that database has just been used
218 1 1. listTables : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.StartProgress(database));
219
220
        var tableCount = Integer.toString(database.getChildCount());
221
        
222
        String resultToParse = StringUtils.EMPTY;
223
        try {
224
            var pageSource = new String[]{ StringUtils.EMPTY };
225
            resultToParse = new SuspendableGetRows(this.injectionModel).run(new Input(
226
                this.injectionModel.getMediatorEngine().getEngine().instance().sqlTables(database),
227
                pageSource,
228
                true,
229
                Integer.parseInt(tableCount),
230
                database,
231
                "tables"
232
            ));
233
        } catch (AbstractSlidingException e) {
234
            resultToParse = DataAccess.getPartialResultAndLog(e, resultToParse);
235
        } catch (Exception e) {  // Catch all exceptions but prevent detecting bug
236
            LOGGER.log(LogLevelUtil.CONSOLE_ERROR, e.getMessage(), e);
237
        }
238
239
        // Parse all the data we have retrieved
240
        var regexSearch = Pattern.compile(
241
                DataAccess.MODE
242
                + DataAccess.ENCLOSE_VALUE_RGX
243
                + DataAccess.CELL_TABLE
244
                + DataAccess.ENCLOSE_VALUE_RGX
245
            )
246
            .matcher(resultToParse);
247
        
248 1 1. listTables : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.EndProgress(database));
249
250 1 1. listTables : negated conditional → NO_COVERAGE
        if (!regexSearch.find()) {
251
            throw new InjectionFailureException("No match while injecting tables");
252
        }
253
        regexSearch.reset();
254
        
255
        List<Table> tables = new ArrayList<>();
256
        
257
        // Build an array of Table objects from the data we have parsed
258 1 1. listTables : negated conditional → NO_COVERAGE
        while (regexSearch.find()) {
259
            String tableName = regexSearch.group(1);
260
            String rowCount = regexSearch.group(2);
261
            
262
            var newTable = new Table(tableName, rowCount, database);
263
            tables.add(newTable);
264
        }
265
266 1 1. listTables : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.AddTables(tables));
267 1 1. listTables : replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::listTables → NO_COVERAGE
        return tables;
268
    }
269
270
    /**
271
     * Get column names and send them to the view.<br>
272
     * Use readable text (not hexa) and parse this pattern with 2nd member forced to 31 (1 in ascii):<br>
273
     * => hh[column name 1]jj[31]hhgghh[column name 2]jj[31]hhggh...hi<br>
274
     * Data window can be cut before the end of the request but the process helps to obtain
275
     * the rest of the unreachable data. The process can be interrupted by the user (stop/pause).
276
     * @param table which contains columns to find
277
     * @return list of columns found
278
     * @throws JSqlException when injection failure or stopped by user
279
     */
280
    public List<Column> listColumns(Table table) throws JSqlException {
281
        List<Column> columns = new ArrayList<>();
282
        
283
        // Inform the view that table has just been used
284 1 1. listColumns : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.StartIndeterminateProgress(table));
285
286
        String resultToParse = StringUtils.EMPTY;
287
        
288
        try {
289
            var pageSource = new String[]{ StringUtils.EMPTY };
290
            resultToParse = new SuspendableGetRows(this.injectionModel).run(new Input(
291
                this.injectionModel.getMediatorEngine().getEngine().instance().sqlColumns(table),
292
                pageSource,
293
                true,
294
                0,
295
                table,
296
                "columns"
297
            ));
298
        } catch (AbstractSlidingException e) {
299
            resultToParse = DataAccess.getPartialResultAndLog(e, resultToParse);
300
        } catch (Exception e) {  // Catch all exceptions but prevent detecting bug
301
            LOGGER.log(LogLevelUtil.CONSOLE_ERROR, e.getMessage(), e);
302
        }
303
304
        // Build SQLite columns
305 1 1. listColumns : negated conditional → NO_COVERAGE
        if (this.injectionModel.getMediatorEngine().isSqlite()) {
306
            resultToParse = this.injectionModel.getMediatorEngine().getSqlite().transformSqlite(resultToParse);
307
        }
308
        
309
        // Parse all the data we have retrieved
310
        var regexSearch = Pattern.compile(
311
                DataAccess.MODE
312
                + DataAccess.ENCLOSE_VALUE_RGX
313
                + DataAccess.CELL_TABLE
314
                + DataAccess.ENCLOSE_VALUE_RGX
315
            )
316
            .matcher(resultToParse);
317
318 1 1. listColumns : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.EndIndeterminateProgress(table));
319
320 1 1. listColumns : negated conditional → NO_COVERAGE
        if (!regexSearch.find()) {
321
            throw new InjectionFailureException("No match while injecting columns");
322
        }
323
324
        regexSearch.reset();
325
326
        // Build an array of Column objects from the data we have parsed
327 1 1. listColumns : negated conditional → NO_COVERAGE
        while (regexSearch.find()) {
328
            String nameColumn = regexSearch.group(1);
329
            var column = new Column(nameColumn, table);
330
            columns.add(column);
331
        }
332
333 1 1. listColumns : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.AddColumns(columns));
334 1 1. listColumns : replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::listColumns → NO_COVERAGE
        return columns;
335
    }
336
337
    /**
338
     * Get table values and count each occurrence and send it to the view.<br>
339
     * Values are on clear text (not hexa) and follows this window pattern<br>
340
     * => hh[value 1]jj[count]hhgghh[value 2]jj[count]hhggh...hi<br>
341
     * Data window can be cut before the end of the request but the process helps to obtain
342
     * the rest of the unreachable data. The process can be interrupted by the user (stop/pause).
343
     * @param columnsBean choice by the user
344
     * @return a 2x2 table containing values by columns
345
     * @throws JSqlException when injection failure or stopped by user
346
     */
347
    public String[][] listValues(List<Column> columnsBean) throws JSqlException {
348
        var databaseBean = (Database) columnsBean.getFirst().getParent().getParent();
349
        var tableBean = (Table) columnsBean.getFirst().getParent();
350
        int rowCount = columnsBean.getFirst().getParent().getChildCount();
351
352
        // Inform the view that table has just been used
353 1 1. listValues : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.StartProgress(tableBean));
354
355
        // Build an array of column names
356
        List<String> columnsName = new ArrayList<>();
357
        for (AbstractElementDatabase columnBean: columnsBean) {
358
            columnsName.add(columnBean.toString());
359
        }
360
361
        // From that array, build the SQL fields nicely
362
        // => col1{%}col2...
363
        // ==> trim(ifnull(`col1`,0x00)),0x7f,trim(ifnull(`Col2`,0x00))...
364
        String[] columns = columnsName.toArray(new String[0]);
365
366
        List<List<String>> listValues = this.getRows(databaseBean, tableBean, rowCount, columns);
367
368
        // Add the default title to the columns: row number, occurrence
369 1 1. listValues : removed call to java/util/List::addFirst → NO_COVERAGE
        columnsName.addFirst(StringUtils.EMPTY);
370 1 1. listValues : removed call to java/util/List::addFirst → NO_COVERAGE
        columnsName.addFirst(StringUtils.EMPTY);
371
372
        String[][] table = this.getTable(columnsName, listValues);
373
374
        columns = columnsName.toArray(new String[0]);
375
        
376 1 1. listValues : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.CreateValuesTab(columns, table, tableBean));
377 1 1. listValues : removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE
        this.injectionModel.sendToViews(new Seal.EndProgress(tableBean));
378 1 1. listValues : replaced return value with null for com/jsql/model/accessible/DataAccess::listValues → NO_COVERAGE
        return table;
379
    }
380
381
    private List<List<String>> getRows(Database database, Table table, int rowCount, String[] columns) throws InjectionFailureException {
382
        String resultToParse = StringUtils.EMPTY;
383
        
384
        try {
385
            var pageSource = new String[]{ StringUtils.EMPTY };
386
            resultToParse = new SuspendableGetRows(this.injectionModel).run(new Input(
387
                this.injectionModel.getMediatorEngine().getEngine().instance().sqlRows(columns, database, table),
388
                pageSource,
389
                true,
390
                rowCount,
391
                table,
392
                "rows"
393
            ));
394
        } catch (AbstractSlidingException e) {  // Catch all exceptions but prevent detecting bug
395
            resultToParse = DataAccess.getPartialResultAndLog(e, resultToParse);
396
        } catch (Exception e) {
397
            LOGGER.log(LogLevelUtil.CONSOLE_ERROR, e.getMessage(), e);
398
        }
399 1 1. getRows : replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::getRows → NO_COVERAGE
        return SuspendableGetRows.parse(resultToParse);
400
    }
401
402
    private static String getPartialResultAndLog(AbstractSlidingException e, String resultToParse) {
403
        LOGGER.log(LogLevelUtil.CONSOLE_ERROR, e.getMessage());
404
405
        // Get pieces of data already retrieved instead of losing them
406
        String resultFromWindow = resultToParse;
407 1 1. getPartialResultAndLog : negated conditional → NO_COVERAGE
        if (StringUtils.isNotEmpty(e.getSlidingWindowAllRows())) {
408
            resultFromWindow = e.getSlidingWindowAllRows();
409 1 1. getPartialResultAndLog : negated conditional → NO_COVERAGE
        } else if (StringUtils.isNotEmpty(e.getSlidingWindowCurrentRows())) {
410
            resultFromWindow = e.getSlidingWindowCurrentRows();
411
        }
412 1 1. getPartialResultAndLog : replaced return value with "" for com/jsql/model/accessible/DataAccess::getPartialResultAndLog → NO_COVERAGE
        return resultFromWindow;
413
    }
414
415
    private String[][] getTable(List<String> columnsName, List<List<String>> values) {
416
        // Build a proper 2D array from the data
417
        var table = new String[values.size()][columnsName.size()];
418
        
419 2 1. getTable : negated conditional → NO_COVERAGE
2. getTable : changed conditional boundary → NO_COVERAGE
        for (var indexRow = 0 ; indexRow < values.size() ; indexRow++) {
420
            var isIncomplete = false;
421
            
422 2 1. getTable : negated conditional → NO_COVERAGE
2. getTable : changed conditional boundary → NO_COVERAGE
            for (var indexColumn = 0 ; indexColumn < columnsName.size() ; indexColumn++) {
423
                try {
424
                    table[indexRow][indexColumn] = values.get(indexRow).get(indexColumn);
425
                } catch (IndexOutOfBoundsException e) {
426
                    isIncomplete = true;
427
                    LOGGER.log(LogLevelUtil.CONSOLE_DEFAULT, I18nUtil.valueByKey("LOG_LIST_VALUES_INCOMPLETE"));
428
                    LOGGER.log(LogLevelUtil.IGNORE, e);
429
                }
430
            }
431
            
432 1 1. getTable : negated conditional → NO_COVERAGE
            if (isIncomplete) {
433
                int logIndexRow = indexRow;
434
                LOGGER.log(
435
                    LogLevelUtil.CONSOLE_ERROR,
436
                    "{}{}: ",
437 1 1. lambda$getTable$2 : replaced return value with null for com/jsql/model/accessible/DataAccess::lambda$getTable$2 → NO_COVERAGE
                    () -> I18nUtil.valueByKey("LOG_LIST_VALUES_TOO_LONG"),
438 2 1. lambda$getTable$3 : replaced return value with null for com/jsql/model/accessible/DataAccess::lambda$getTable$3 → NO_COVERAGE
2. lambda$getTable$3 : Replaced integer addition with subtraction → NO_COVERAGE
                    () -> logIndexRow + 1
439
                );
440
441
                LOGGER.log(
442
                    LogLevelUtil.CONSOLE_ERROR,
443 1 1. lambda$getTable$4 : replaced return value with null for com/jsql/model/accessible/DataAccess::lambda$getTable$4 → NO_COVERAGE
                    () -> String.join(
444
                        ", ",
445
                        values.get(logIndexRow).toArray(new String[0])
446
                    )
447
                );
448
            }
449
        }
450 1 1. getTable : replaced return value with null for com/jsql/model/accessible/DataAccess::getTable → NO_COVERAGE
        return table;
451
    }
452
}

Mutations

120

1.1
Location : getDatabaseInfos
Killed by : none
negated conditional → NO_COVERAGE

121

1.1
Location : getDatabaseInfos
Killed by : none
removed call to com/jsql/model/InjectionModel::sendResponseFromSite → NO_COVERAGE

184

1.1
Location : listDatabases
Killed by : none
negated conditional → NO_COVERAGE

190

1.1
Location : listDatabases
Killed by : none
negated conditional → NO_COVERAGE

198

1.1
Location : listDatabases
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

199

1.1
Location : listDatabases
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::listDatabases → NO_COVERAGE

215

1.1
Location : listTables
Killed by : none
removed call to com/jsql/model/InjectionModel::setIsStoppedByUser → NO_COVERAGE

218

1.1
Location : listTables
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

248

1.1
Location : listTables
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

250

1.1
Location : listTables
Killed by : none
negated conditional → NO_COVERAGE

258

1.1
Location : listTables
Killed by : none
negated conditional → NO_COVERAGE

266

1.1
Location : listTables
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

267

1.1
Location : listTables
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::listTables → NO_COVERAGE

284

1.1
Location : listColumns
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

305

1.1
Location : listColumns
Killed by : none
negated conditional → NO_COVERAGE

318

1.1
Location : listColumns
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

320

1.1
Location : listColumns
Killed by : none
negated conditional → NO_COVERAGE

327

1.1
Location : listColumns
Killed by : none
negated conditional → NO_COVERAGE

333

1.1
Location : listColumns
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

334

1.1
Location : listColumns
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::listColumns → NO_COVERAGE

353

1.1
Location : listValues
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

369

1.1
Location : listValues
Killed by : none
removed call to java/util/List::addFirst → NO_COVERAGE

370

1.1
Location : listValues
Killed by : none
removed call to java/util/List::addFirst → NO_COVERAGE

376

1.1
Location : listValues
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

377

1.1
Location : listValues
Killed by : none
removed call to com/jsql/model/InjectionModel::sendToViews → NO_COVERAGE

378

1.1
Location : listValues
Killed by : none
replaced return value with null for com/jsql/model/accessible/DataAccess::listValues → NO_COVERAGE

399

1.1
Location : getRows
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/accessible/DataAccess::getRows → NO_COVERAGE

407

1.1
Location : getPartialResultAndLog
Killed by : none
negated conditional → NO_COVERAGE

409

1.1
Location : getPartialResultAndLog
Killed by : none
negated conditional → NO_COVERAGE

412

1.1
Location : getPartialResultAndLog
Killed by : none
replaced return value with "" for com/jsql/model/accessible/DataAccess::getPartialResultAndLog → NO_COVERAGE

419

1.1
Location : getTable
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getTable
Killed by : none
changed conditional boundary → NO_COVERAGE

422

1.1
Location : getTable
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getTable
Killed by : none
changed conditional boundary → NO_COVERAGE

432

1.1
Location : getTable
Killed by : none
negated conditional → NO_COVERAGE

437

1.1
Location : lambda$getTable$2
Killed by : none
replaced return value with null for com/jsql/model/accessible/DataAccess::lambda$getTable$2 → NO_COVERAGE

438

1.1
Location : lambda$getTable$3
Killed by : none
replaced return value with null for com/jsql/model/accessible/DataAccess::lambda$getTable$3 → NO_COVERAGE

2.2
Location : lambda$getTable$3
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

443

1.1
Location : lambda$getTable$4
Killed by : none
replaced return value with null for com/jsql/model/accessible/DataAccess::lambda$getTable$4 → NO_COVERAGE

450

1.1
Location : getTable
Killed by : none
replaced return value with null for com/jsql/model/accessible/DataAccess::getTable → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.22.1