Interface UDFContext

  • All Known Implementing Classes:
    UDFContextImpl

    public interface UDFContext
    Provides context information for a particular user defined function. Java UDFs can access implementations of this interface using the udfContext field, scripted UDFs can get it using the udfContext binding.
    • Method Detail

      • newArgUDTValue

        UDTValue newArgUDTValue​(java.lang.String argName)
        Creates a new UDTValue instance for an argument.
        Parameters:
        argName - name of the argument as declared in the CREATE FUNCTION statement
        Returns:
        a new UDTValue instance
        Throws:
        java.lang.IllegalArgumentException - if no argument for the given name exists
        java.lang.IllegalStateException - if the argument is not a UDT
      • newArgUDTValue

        UDTValue newArgUDTValue​(int argNum)
        Creates a new UDTValue instance for an argument.
        Parameters:
        argNum - zero-based index of the argument as declared in the CREATE FUNCTION statement
        Returns:
        a new UDTValue instance
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if no argument for the given index exists
        java.lang.IllegalStateException - if the argument is not a UDT
      • newReturnUDTValue

        UDTValue newReturnUDTValue()
        Creates a new UDTValue instance for the return value.
        Returns:
        a new UDTValue instance
        Throws:
        java.lang.IllegalStateException - if the return type is not a UDT
      • newUDTValue

        UDTValue newUDTValue​(java.lang.String udtName)
        Creates a new UDTValue instance by name in the same keyspace.
        Parameters:
        udtName - name of the user defined type in the same keyspace as the function
        Returns:
        a new UDTValue instance
        Throws:
        java.lang.IllegalArgumentException - if no UDT for the given name exists
      • newArgTupleValue

        TupleValue newArgTupleValue​(java.lang.String argName)
        Creates a new TupleValue instance for an argument.
        Parameters:
        argName - name of the argument as declared in the CREATE FUNCTION statement
        Returns:
        a new TupleValue instance
        Throws:
        java.lang.IllegalArgumentException - if no argument for the given name exists
        java.lang.IllegalStateException - if the argument is not a tuple
      • newArgTupleValue

        TupleValue newArgTupleValue​(int argNum)
        Creates a new TupleValue instance for an argument.
        Parameters:
        argNum - zero-based index of the argument as declared in the CREATE FUNCTION statement
        Returns:
        a new TupleValue instance
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if no argument for the given index exists
        java.lang.IllegalStateException - if the argument is not a tuple
      • newReturnTupleValue

        TupleValue newReturnTupleValue()
        Creates a new TupleValue instance for the return value.
        Returns:
        a new TupleValue instance
        Throws:
        java.lang.IllegalStateException - if the return type is not a tuple
      • newTupleValue

        TupleValue newTupleValue​(java.lang.String cqlDefinition)
        Creates a new TupleValue instance for the CQL type definition.
        Parameters:
        cqlDefinition - CQL tuple type definition like tuple<int, text, bigint>
        Returns:
        a new TupleValue instance
        Throws:
        java.lang.IllegalStateException - if cqlDefinition type is not a tuple or an invalid type