Package com.datastax.driver.core
Class FunctionMetadata
- java.lang.Object
-
- com.datastax.driver.core.FunctionMetadata
-
public class FunctionMetadata extends Object
Describes a CQL function (created withCREATE FUNCTION...).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasCQLQuery()Returns a CQL query representing this function.booleanequals(Object other)StringexportAsString()Returns a CQL query representing this function in human readable form.Map<String,DataType>getArguments()Returns the names and types of this function's arguments.StringgetBody()Returns the body of this function.KeyspaceMetadatagetKeyspace()Returns the keyspace this function belongs to.StringgetLanguage()Returns the programming language in which this function's body is written.DataTypegetReturnType()Returns the return type of this function.StringgetSignature()Returns the CQL signature of this function.StringgetSimpleName()Returns the simple name of this function.inthashCode()booleanisCalledOnNullInput()Indicates whether this function's body gets called on null input.StringtoString()
-
-
-
Method Detail
-
exportAsString
public String exportAsString()
Returns a CQL query representing this function in human readable form.This method is equivalent to
asCQLQuery()but the output is formatted.- Returns:
- the CQL query representing this function.
-
asCQLQuery
public String asCQLQuery()
Returns a CQL query representing this function.This method returns a single 'CREATE FUNCTION' query corresponding to this function definition.
- Returns:
- the 'CREATE FUNCTION' query corresponding to this function.
-
getKeyspace
public KeyspaceMetadata getKeyspace()
Returns the keyspace this function belongs to.- Returns:
- the keyspace metadata of the keyspace this function belongs to.
-
getSignature
public String getSignature()
Returns the CQL signature of this function.This is the name of the function, followed by the names of the argument types between parentheses, for example
sum(int,int).Note that the returned signature is not qualified with the keyspace name.
- Returns:
- the signature of this function.
-
getSimpleName
public String getSimpleName()
Returns the simple name of this function.This is the name of the function, without arguments. Note that functions can be overloaded with different argument lists, therefore the simple name may not be unique. For example,
sum(int,int)andsum(int,int,int)both have the simple namesum.- Returns:
- the simple name of this function.
- See Also:
getSignature()
-
getArguments
public Map<String,DataType> getArguments()
Returns the names and types of this function's arguments.- Returns:
- a map from argument name to argument type.
-
getBody
public String getBody()
Returns the body of this function.- Returns:
- the body.
-
isCalledOnNullInput
public boolean isCalledOnNullInput()
Indicates whether this function's body gets called on null input.This is
trueif the function was created withCALLED ON NULL INPUT, andfalseif it was created withRETURNS NULL ON NULL INPUT.- Returns:
- whether this function's body gets called on null input.
-
getLanguage
public String getLanguage()
Returns the programming language in which this function's body is written.- Returns:
- the language.
-
getReturnType
public DataType getReturnType()
Returns the return type of this function.- Returns:
- the return type.
-
-