public class FunctionMetadataResultSetBuilder extends AbstractMetadataResultSetBuilder
CassandraMetadataResultSet objects) related to functions.| Constructor and Description |
|---|
FunctionMetadataResultSetBuilder(CassandraStatement statement)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CassandraMetadataResultSet |
buildFunctionColumns(String schemaPattern,
String functionNamePattern,
String columnNamePattern)
Builds a valid result set of the given catalog's system or user function parameters and return type.
|
CassandraMetadataResultSet |
buildFunctions(String schemaPattern,
String functionNamePattern)
Builds a valid result set of the system and user functions available in the given catalog (Cassandra cluster).
|
matchesPatternpublic FunctionMetadataResultSetBuilder(CassandraStatement statement) throws SQLException
statement - The statement.SQLException - if a database access error occurs or this statement is closed.public CassandraMetadataResultSet buildFunctions(String schemaPattern, String functionNamePattern) throws SQLException
DatabaseMetaData.getFunctions(String, String, String).
Only system and user function descriptions matching the schema and function name criteria are returned. They are
ordered by FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME and SPECIFIC_NAME.
The columns of this result set are:
null: here is the Cassandra cluster
name (if available).null: here is the keyspace the table
is member of.DatabaseMetaData.functionResultUnknown - cannot determine if a return value or table
will be returnedDatabaseMetaData.functionNoTable - does not return a table (Cassandra user-defined
functions only return CQL types, so never a table)DatabaseMetaData.functionReturnsTable - returns a tableFUNCTION_NAME
for example with overload functions.
A user may not have permission to execute any of the functions that are returned by getFunctions.
schemaPattern - A schema name pattern. It must match the schema name as it is stored in the
database; "" retrieves those without a schema and null means that
the schema name should not be used to narrow down the search.functionNamePattern - A function name pattern; must match the function name as it is stored in the
database.DatabaseMetaData.getFunctions(String, String, String).SQLException - when something went wrong during the creation of the result set.public CassandraMetadataResultSet buildFunctionColumns(String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException
DatabaseMetaData.getFunctionColumns(String, String, String, String).
Only descriptions matching the schema, function and parameter name criteria are returned. They are ordered by
FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME and SPECIFIC_NAME. Within this, the
return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions
follow in column number order.
The columns of this result set are:
null: here is the Cassandra cluster
name (if available).null: here is the keyspace the table
is member of.DatabaseMetaData.functionColumnUnknown - unknown typeDatabaseMetaData.functionColumnIn - IN parameterDatabaseMetaData.functionColumnInOut - INOUT parameterDatabaseMetaData.functionColumnOut - OUT parameterDatabaseMetaData.functionReturn - function return valueDatabaseMetaData.functionColumnResult - indicates that the parameter or column is a
column in the ResultSetTypes.null is returned for data types where SCALE is not
applicable.NULL for this type:
DatabaseMetaData.typeNoNulls - does not allow NULL valuesDatabaseMetaData.typeNullable - allows NULL valuesDatabaseMetaData.typeNullableUnknown - nullability unknownNULL.NULL values, "NO"
if not and empty if the nullability is unknown.FUNCTION_NAME
for example with overload functions.
The PRECISION column represents the maximum column size that the server supports for the given datatype.
For numeric data, this is the maximum precision. For character data, this is the length in characters. For
datetime data types, this is the length in characters of the String representation (assuming the maximum
allowed precision of the fractional seconds component). For binary data, this is the length in bytes.
For the ROWID datatype (not supported by Cassandra), this is the length in bytes. The value null
is returned for data types where the column size is not applicable.
schemaPattern - A schema name pattern. It must match the schema name as it is stored in the
database; "" retrieves those without a schema and null means that
the schema name should not be used to narrow down the search.functionNamePattern - A function name pattern; must match the function name as it is stored in the
database.columnNamePattern - A parameter name pattern; must match the parameter or column name as it is stored
in the database.DatabaseMetaData.getFunctionColumns(String, String, String, String).SQLException - when something went wrong during the creation of the result set.Copyright © 2020–2024 ING Bank. All rights reserved.