public abstract class SQLValueProvider extends java.lang.Object implements DynamicValueProvider
Connection.createStatement()
and
Statement.executeQuery(String)
, which means that the SQL query can be any standard
SQL statement. SPs also work for most databases, but not for Oracle or PostgreSQL.Datasource
,
Statement.execute(String)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
MAX_RECORDS
The maximum number of records that will be fetched before the rest are ignored and the prompt becomes editable.
|
Modifier and Type | Method and Description |
---|---|
abstract Datasource |
getDatasource()
Returns the data source the query is to be run on
|
void |
getDefaultValues(java.util.function.Function<DefaultValue,java.lang.Boolean> func)
Query the DefaultValue objects for a prompt field.
|
abstract java.lang.String |
getSQL()
Returns the query which is to be used for fetching the values and optionally descriptions dynamically.
|
getDefaultValues
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public static final int MAX_RECORDS
public void getDefaultValues(java.util.function.Function<DefaultValue,java.lang.Boolean> func)
getDefaultValues
in interface DynamicValueProvider
func
- the function to use to compute the valuejava.lang.IllegalStateException
- if the query returns a value or a description longer than 50000 characters.public abstract java.lang.String getSQL() throws ReportException, java.sql.SQLException
ReportException
- if the database structure does allow a single joined queryjava.sql.SQLException
- on SQL errors during requesting metadatapublic abstract Datasource getDatasource()
Copyright © 1999-2020 by i-net software GmbH