Class DatabaseResultSetHelper
java.lang.Object
org.eclipse.dirigible.databases.helpers.DatabaseResultSetHelper
public class DatabaseResultSetHelper extends Object
The Database Result SetHelper.
-
Constructor Summary
Constructors Constructor Description DatabaseResultSetHelper() -
Method Summary
Modifier and Type Method Description static Stringprint(ResultSet resultSet, boolean limited)Prints the provided ResultSet to theResultSetMonospacedWriterwriter.static StringtoCsv(ResultSet resultSet, boolean limited, boolean stringify)Prints the provided ResultSet to theResultSetCsvWriterwriter.static StringtoJson(ResultSet resultSet, boolean limited, boolean stringify)Prints the provided ResultSet to theResultSetJsonWriterwriter.
-
Constructor Details
-
DatabaseResultSetHelper
public DatabaseResultSetHelper()
-
-
Method Details
-
print
Prints the provided ResultSet to theResultSetMonospacedWriterwriter.- Parameters:
resultSet- the result setlimited- the limited- Returns:
- the string
- Throws:
SQLException- the SQL exception
-
toJson
public static String toJson(ResultSet resultSet, boolean limited, boolean stringify) throws SQLExceptionPrints the provided ResultSet to theResultSetJsonWriterwriter.- Parameters:
resultSet- the result setlimited- the limitedstringify- the stringified flag- Returns:
- the string
- Throws:
SQLException- the SQL exception
-
toCsv
public static String toCsv(ResultSet resultSet, boolean limited, boolean stringify) throws SQLExceptionPrints the provided ResultSet to theResultSetCsvWriterwriter.- Parameters:
resultSet- the result setlimited- the limitedstringify- the stringified flag- Returns:
- the string
- Throws:
SQLException- the SQL exception
-