public class DBDataProvider extends CommonDataProvider implements DataInputProvider
CommonDataProvider.ResultColumnNamesDataProvider.typecolumns, dataInPath, dataOutPath, indexData, resultColumnName, scenarioName| Constructor and Description | 
|---|
DBDataProvider(String type,
              String user,
              String password,
              String hostname,
              String port,
              String database)  | 
| Modifier and Type | Method and Description | 
|---|---|
Connection | 
getConnection()  | 
int | 
getNbLines()
Gets the number of readable lines of current opened file. 
 | 
void | 
prepare(String scenario) | 
String[] | 
readLine(int line,
        boolean readResult) | 
String | 
readValue(String column,
         int line)
Reads a cell of opened input file. 
 | 
protected static void | 
sqlSanitized4readOnly(String sqlInput)  | 
getIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexData, writeDataResult, writeFailedResult, writeSuccessResult, writeValue, writeWarningResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexDatapublic DBDataProvider(String type, String user, String password, String hostname, String port, String database) throws TechnicalException
TechnicalExceptionpublic Connection getConnection() throws SQLException
SQLExceptionpublic void prepare(String scenario) throws TechnicalException
prepare in interface DataProviderTechnicalExceptionpublic int getNbLines()
               throws TechnicalException
getNbLines in interface DataInputProviderTechnicalException - is thrown if you have a technical error (IOException on .sql file) in NoraUi.public String readValue(String column, int line) throws TechnicalException
readValue in interface DataInputProvidercolumn - index of the column to readline - index of the line to readTechnicalException - is thrown if you have a technical error (IOException on .sql file) in NoraUi.public String[] readLine(int line, boolean readResult) throws TechnicalException
readLine in interface DataInputProviderline - id of the line to read (line=0 for reading headers ; line=1 for reading 1st line, ...)readResult - true if result must be returned, false otherwiseTechnicalException - is thrown if you have a technical error (IOException on .sql file) in NoraUi.protected static void sqlSanitized4readOnly(String sqlInput) throws TechnicalException
TechnicalExceptionCopyright © 2023 NoraUi. All rights reserved.