Interface Terms


  • public interface Terms
    A set of Terms
    • Field Detail

      • UNSET_LIST

        static final java.util.List UNSET_LIST
        The List returned when the list was not set.
    • Method Detail

      • addFunctionsTo

        void addFunctionsTo​(java.util.List<Function> functions)
        Adds all functions (native and user-defined) used by any of the terms to the specified list.
        Parameters:
        functions - the list to add to
      • collectMarkerSpecification

        void collectMarkerSpecification​(VariableSpecifications boundNames)
        Collects the column specifications for the bind variables in the terms. This is obviously a no-op if the terms are Terminal.
        Parameters:
        boundNames - the variables specification where to collect the bind variables of the terms in.
      • bind

        java.util.List<Term.Terminal> bind​(QueryOptions options)
        Bind the values in these terms to the values contained in options. This is obviously a no-op if the term is Terminal.
        Parameters:
        options - the values to bind markers to.
        Returns:
        the result of binding all the variables of these NonTerminals or an UNSET_LIST if the term was unset.
      • bindAndGet

        java.util.List<java.nio.ByteBuffer> bindAndGet​(QueryOptions options)
      • ofListMarker

        static Terms ofListMarker​(Lists.Marker marker,
                                  AbstractType<?> type)
        Creates a Terms for the specified list marker.
        Parameters:
        marker - the list marker
        type - the element type
        Returns:
        a Terms for the specified list marker
      • of

        static Terms of​(Term term)
        Creates a Terms containing a single Term.
        Parameters:
        term - the Term
        Returns:
        a Terms containing a single Term.
      • of

        static Terms of​(java.util.List<Term> terms)
        Creates a Terms containing a set of Term.
        Parameters:
        term - the Term
        Returns:
        a Terms containing a set of Term.
      • addFunctions

        static void addFunctions​(java.lang.Iterable<Term> terms,
                                 java.util.List<Function> functions)
        Adds all functions (native and user-defined) of the specified terms to the list.
        Parameters:
        functions - the list to add to
      • asBytes

        static java.nio.ByteBuffer asBytes​(java.lang.String keyspace,
                                           java.lang.String term,
                                           AbstractType type)