Interface Terms


public interface Terms
A set of Terms
  • Field Details

    • UNSET_LIST

      static final List UNSET_LIST
      The List returned when the list was not set.
  • Method Details

    • addFunctionsTo

      void addFunctionsTo(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

      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

      List<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(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(Iterable<Term> terms, 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 ByteBuffer asBytes(String keyspace, String term, AbstractType type)