See: Description
Interface | Description |
---|---|
JdbcSelectListener |
JDBC Datasource query execute listener.
|
Class | Description |
---|---|
CallableStatementWrapper |
Wraps all use of CallableStatement so we can track if we closed all statements.
|
ConnectionWrapper |
Wraps all use of Connection so we can track if we closed all connections.
|
JdbcDataSource |
This supplies a data source to Windward Reports using jdbc.
|
JdbcDataSource.JdbcSelect | |
JdbcQueryHelper |
Created by mattb on 2/1/2017.
|
JdbcResultRow |
Created by mattb on 2/1/2017.
|
JdbcResultSet |
Created by mattb on 2/1/2017.
|
PreparedStatementWrapper |
Wraps all use of PreparedStatement so we can track if we closed all statements.
|
SelectParser |
Simple select parser.
|
StatementWrapper |
Wraps all use of Statement so we can track if we closed all statements.
|
VerifyJdbcConnection |
Test a JDBC connection
|
An xml file always has the concept of the current node. This is not the case with a sql database - there is no current ResultSet. A ResultSet is only generated by the wr:query and the wr:foreach tags. Therefore, all other tags only make sense if they use the var attribute from a query or foreach to identify the ResultSet they are to be applied to. A tag not identifying a ResultSet will throw an exception.
A query or foreach tag can reference a var from another query or foreach tag using ${var.item}.. An XPath query can describe a node as well as an element. In this class a query defines a ResultSet and is only an element.
Also, with xml you can use xpath in each tag performing complex logic in determining what text to return. It is very different for sql. The foreach or query can have complex logic. But the other tags can only return an element from a result set that the foreach/query earlier returned.
When using a var (<wr:forEach var="result"/>) that identifies a result set, you can use the following in a tag:
return ResultSet.getInt(1) > 0;
. This does not look at the select statement, it is the notEmpty="true" that
puts it in this mode.Notes: statements are created using Connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY) The TYPE_SCROLL_SENSITIVE setting is necessary in some jdbc drivers for ResultSet.isLast() to function.
A really good book on JDBC that includes these parameters for creating a connection with most databases is
JDBC Pocket Reference from O'Reilly.
Copyright © 2002-2021 Windward Studios, LLC. - All Rights Reserved. We are Java document generation software