Package mil.nga.geopackage.io
Class SQLExecResult
- java.lang.Object
-
- mil.nga.geopackage.io.SQLExecResult
-
-
Constructor Summary
Constructors Constructor Description SQLExecResult()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(int index, String column)
Add a columnvoid
addColumn(String column)
Add a columnvoid
addColumns(Collection<String> columns)
Add columnsvoid
addColumnWidth(int width)
Add a column widthvoid
addColumnWidth(int index, int width)
Add a column widthvoid
addColumnWidths(int[] widths)
Add the column widthsvoid
addRow(List<String> row)
Add a rowvoid
addRowValue(int index, int columnIndex, String value)
Add a row valuevoid
addRowValue(int index, String value)
Add a row valuevoid
addTable(String table)
Add a tableString
getColumn(int index)
Get the column name at the indexList<String>
getColumns()
Get the columnsint
getColumnWidth(int index)
Get the column width at the indexList<Integer>
getColumnWidths()
Get the column widthsInteger
getMaxColumnWidth()
Get the max column widthInteger
getMaxLinesPerRow()
Get the max lines per rowInteger
getMaxRows()
Get the max rows queriedList<String>
getRow(int index)
Get the row at the row indexList<List<String>>
getRows()
Get the rowsList<String>
getTables()
Get the tablesInteger
getUpdateCount()
Get the update countString
getValue(int rowIndex, int columnIndex)
Get the value at the row and column indexboolean
hasColumns()
Determine if the results have any columnsboolean
hasMaxResults()
Determine if the result has the max number of resultsboolean
hasRows()
Determine if the results have any rowsboolean
hasUpdateCount()
Check if has an update countboolean
isPrintSides()
Is the print sides flag enabledint
numColumns()
Get the number of columnsint
numRows()
Get the number of rowsvoid
printResults()
Print the results usingSystem.out
void
setMaxColumnWidth(Integer maxColumnWidth)
Set the max column widthvoid
setMaxLinesPerRow(Integer maxLinesPerRow)
Set the max lines per rowvoid
setMaxRows(Integer maxRows)
Set the max rows queriedvoid
setPrintSides(boolean printSides)
Set the print sides flagvoid
setUpdateCount(Integer updateCount)
Set the update count
-
-
-
Method Detail
-
addTable
public void addTable(String table)
Add a table- Parameters:
table
- table name
-
addColumn
public void addColumn(String column)
Add a column- Parameters:
column
- column name
-
addColumn
public void addColumn(int index, String column)
Add a column- Parameters:
index
- column indexcolumn
- column name- Since:
- 5.0.0
-
addColumns
public void addColumns(Collection<String> columns)
Add columns- Parameters:
columns
- column names
-
numColumns
public int numColumns()
Get the number of columns- Returns:
- column count
-
getColumn
public String getColumn(int index)
Get the column name at the index- Parameters:
index
- column index- Returns:
- column name
-
hasColumns
public boolean hasColumns()
Determine if the results have any columns- Returns:
- true if has columns
-
getMaxColumnWidth
public Integer getMaxColumnWidth()
Get the max column width- Returns:
- max column width
- Since:
- 4.0.0
-
setMaxColumnWidth
public void setMaxColumnWidth(Integer maxColumnWidth)
Set the max column width- Parameters:
maxColumnWidth
- max column width- Since:
- 4.0.0
-
getMaxLinesPerRow
public Integer getMaxLinesPerRow()
Get the max lines per row- Returns:
- max lines per row
- Since:
- 4.0.0
-
setMaxLinesPerRow
public void setMaxLinesPerRow(Integer maxLinesPerRow)
Set the max lines per row- Parameters:
maxLinesPerRow
- max lines per row- Since:
- 4.0.0
-
addColumnWidth
public void addColumnWidth(int width)
Add a column width- Parameters:
width
- column width
-
addColumnWidth
public void addColumnWidth(int index, int width)
Add a column width- Parameters:
index
- column indexwidth
- column width- Since:
- 5.0.0
-
addColumnWidths
public void addColumnWidths(int[] widths)
Add the column widths- Parameters:
widths
- column widths
-
getColumnWidth
public int getColumnWidth(int index)
Get the column width at the index- Parameters:
index
- column index- Returns:
- column width
-
numRows
public int numRows()
Get the number of rows- Returns:
- number of rows
-
hasRows
public boolean hasRows()
Determine if the results have any rows- Returns:
- true if has rows
-
getRow
public List<String> getRow(int index)
Get the row at the row index- Parameters:
index
- row index- Returns:
- result row
-
addRowValue
public void addRowValue(int index, String value)
Add a row value- Parameters:
index
- row indexvalue
- value- Since:
- 5.0.0
-
addRowValue
public void addRowValue(int index, int columnIndex, String value)
Add a row value- Parameters:
index
- row indexcolumnIndex
- column indexvalue
- value- Since:
- 5.0.0
-
getValue
public String getValue(int rowIndex, int columnIndex)
Get the value at the row and column index- Parameters:
rowIndex
- row indexcolumnIndex
- column index- Returns:
- value as a string
-
setUpdateCount
public void setUpdateCount(Integer updateCount)
Set the update count- Parameters:
updateCount
- update count
-
getUpdateCount
public Integer getUpdateCount()
Get the update count- Returns:
- update count
-
hasUpdateCount
public boolean hasUpdateCount()
Check if has an update count- Returns:
- true if has an update count
-
setMaxRows
public void setMaxRows(Integer maxRows)
Set the max rows queried- Parameters:
maxRows
- max rows
-
getMaxRows
public Integer getMaxRows()
Get the max rows queried- Returns:
- max rows
-
hasMaxResults
public boolean hasMaxResults()
Determine if the result has the max number of results- Returns:
- true if max results
-
isPrintSides
public boolean isPrintSides()
Is the print sides flag enabled- Returns:
- true to print sides
-
setPrintSides
public void setPrintSides(boolean printSides)
Set the print sides flag- Parameters:
printSides
- true to print sides
-
printResults
public void printResults()
Print the results usingSystem.out
-
-