Package com.jsql.model.accessible
Class DataAccess
java.lang.Object
com.jsql.model.accessible.DataAccess
Database resource object to read name of databases, tables, columns and values
using most suited injection strategy.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Regex schema describing a table cell with firstly the cell content and secondly the number of occurrences of the cell text, separated by the reserved character x05 in hexadecimal.static final String
Regex character enclosing a table cell returned by injection.static final String
static final String
Regex keywords corresponding to multiline and case-insensitive match.static final String
Regex character used between each table cells.static final String
Regex character used between the table cell and the number of occurrence of the cell text.static final String
static final String
static final String
static final String
Regex characters marking the end of the result of an injection. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Get general database informations.
=> version{%}database{%}user{%}CURRENT_USERlistColumns
(Table table) Get column names and send them to the view.
Use readable text (not hexa) and parse this pattern with 2nd member forced to 31 (1 in ascii):
=> hh[column name 1]jj[31]hhgghh[column name 2]jj[31]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data.Get database names and table counts and send them to the view.
Use readable text (not hexa) and parse this pattern:
=> hh[database name 1]jj[table count]hhgghh[database name 2]jj[table count]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data.listTables
(Database database) Get tables name and row count and send them to the view.
Use readable text (not hexa) and parse this pattern:
=> hh[table name 1]jj[rows count]hhgghh[table name 2]jj[rows count]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data.String[][]
listValues
(List<Column> columnsBean) Get table values and count each occurrences and send them to the view.
Values are on clear text (not hexa) and follows this window pattern
=> hh[value 1]jj[count]hhgghh[value 2]jj[count]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data.
-
Field Details
-
TRAIL_RGX
Regex characters marking the end of the result of an injection. Process stops when this schema is encountered:SQLix01x03x03x07
- See Also:
-
SEPARATOR_CELL_RGX
Regex character used between each table cells. Expected schema of multiple table cells :x04[table cell]x05[number of occurrences]x04x06x04[table cell]x05[number of occurrences]x04
- See Also:
-
SEPARATOR_QTE_RGX
Regex character used between the table cell and the number of occurrence of the cell text. Expected schema of a table cell data isx04[table cell]x05[number of occurrences]x04
- See Also:
-
ENCLOSE_VALUE_RGX
Regex character enclosing a table cell returned by injection. It allows to detect the correct end of a table cell data during parsing. Expected schema of a table cell data isx04[table cell]x05[number of occurrences]x04
- See Also:
-
LEAD
- See Also:
-
SHELL_LEAD
- See Also:
-
TRAIL
- See Also:
-
SHELL_TRAIL
- See Also:
-
MODE
Regex keywords corresponding to multiline and case-insensitive match.- See Also:
-
CELL_TABLE
Regex schema describing a table cell with firstly the cell content and secondly the number of occurrences of the cell text, separated by the reserved character x05 in hexadecimal. The range of characters from x01 to x1F are not printable ASCII characters used to parse the data and exclude printable characters during parsing. Expected schema of a table cell data isx04[table cell]x05[number of occurrences]x04
- See Also:
-
-
Constructor Details
-
DataAccess
-
-
Method Details
-
getDatabaseInfos
public void getDatabaseInfos()Get general database informations.
=> version{%}database{%}user{%}CURRENT_USER -
listDatabases
Get database names and table counts and send them to the view.
Use readable text (not hexa) and parse this pattern:
=> hh[database name 1]jj[table count]hhgghh[database name 2]jj[table count]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data. The process can be interrupted by the user (stop/pause).- Returns:
- list of databases found
- Throws:
JSqlException
- when injection failure or stopped by user
-
listTables
Get tables name and row count and send them to the view.
Use readable text (not hexa) and parse this pattern:
=> hh[table name 1]jj[rows count]hhgghh[table name 2]jj[rows count]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data. The process can be interrupted by the user (stop/pause).- Parameters:
database
- which contains tables to find- Returns:
- list of tables found
- Throws:
JSqlException
- when injection failure or stopped by user
-
listColumns
Get column names and send them to the view.
Use readable text (not hexa) and parse this pattern with 2nd member forced to 31 (1 in ascii):
=> hh[column name 1]jj[31]hhgghh[column name 2]jj[31]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data. The process can be interrupted by the user (stop/pause).- Parameters:
table
- which contains columns to find- Returns:
- list of columns found
- Throws:
JSqlException
- when injection failure or stopped by user
-
listValues
Get table values and count each occurrences and send them to the view.
Values are on clear text (not hexa) and follows this window pattern
=> hh[value 1]jj[count]hhgghh[value 2]jj[count]hhggh...hi
Data window can be cut before the end of the request but the process helps to obtain the rest of the unreachable data. The process can be interrupted by the user (stop/pause).- Parameters:
columnsBean
- choice by the user- Returns:
- a 2x2 table containing values by columns
- Throws:
JSqlException
- when injection failure or stopped by user
-