Class AbstractFunction

    • Method Detail

      • argumentsList

        public java.util.List<java.lang.String> argumentsList()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • referencesUserType

        public boolean referencesUserType​(java.nio.ByteBuffer name)
        Specified by:
        referencesUserType in interface Function
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • testAssignment

        public final AssignmentTestable.TestResult testAssignment​(java.lang.String keyspace,
                                                                  ColumnSpecification receiver)
        Specified by:
        testAssignment in interface AssignmentTestable
        Returns:
        whether this object can be assigned to the provided receiver. We distinguish between 3 values: - EXACT_MATCH if this object is exactly of the type expected by the receiver - WEAKLY_ASSIGNABLE if this object is not exactly the expected type but is assignable nonetheless - NOT_ASSIGNABLE if it's not assignable Most caller should just call the isAssignable() method on the result, though functions have a use for testing "strong" equality to decide the most precise overload to pick when multiple could match.
      • getCompatibleTypeIfKnown

        public AbstractType<?> getCompatibleTypeIfKnown​(java.lang.String keyspace)
        Specified by:
        getCompatibleTypeIfKnown in interface AssignmentTestable
        Returns:
        A data type that can represent this, or null if we can't determine that type. The returned type won't necessarely be the exact type, but one that is compatible with it.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • elementKeyspace

        public java.lang.String elementKeyspace()
      • elementName

        public java.lang.String elementName()
      • toCqlString

        protected java.lang.String toCqlString​(AbstractType<?> type)
        Converts the specified type into its CQL representation.

        For user function and aggregates tuples need to be handle in a special way as they are frozen by nature but the frozen keyword should not appear in their CQL definition.

        Parameters:
        type - the type
        Returns:
        the CQL representation of the specified type
      • columnName

        public java.lang.String columnName​(java.util.List<java.lang.String> columnNames)
        Description copied from interface: Function
        Returns the name of the function to use within a ResultSet.
        Specified by:
        columnName in interface Function
        Parameters:
        columnNames - the names of the columns used to call the function
        Returns:
        the name of the function to use within a ResultSet
      • typesMatch

        public boolean typesMatch​(java.util.List<AbstractType<?>> types)