Class FunctionMetadata


  • public class FunctionMetadata
    extends Object
    Describes a CQL function (created with CREATE FUNCTION...).
    • 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) and sum(int,int,int) both have the simple name sum.

        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 true if the function was created with CALLED ON NULL INPUT, and false if it was created with RETURNS 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object