Package org.apache.cassandra.schema
Class UserFunctions
java.lang.Object
org.apache.cassandra.schema.UserFunctions
- All Implemented Interfaces:
Iterable<UserFunction>
An immutable container for a keyspace's UDAs and UDFs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic enumstatic final classUserFunctions.FunctionsDiff<T extends Function> -
Method Summary
Modifier and TypeMethodDescriptionaggregatesUsingFunction(Function function) static UserFunctions.Builderbuilder()booleanfilter(Predicate<UserFunction> predicate) find(FunctionName name, List<AbstractType<?>> argTypes) find(FunctionName name, List<AbstractType<?>> argTypes, UserFunctions.Filter filter) Find the function with the specified nameget(FunctionName name) Get all function overloads with the specified namegetUdas(FunctionName name) Get all UDAs overloads with the specified namegetUdfs(FunctionName name) Get all UDFs overloads with the specified nameinthashCode()booleanisEmpty()iterator()static UserFunctionsnone()intsize()stream()toString()static inttypeHashCode(List<AbstractType<?>> types) static inttypeHashCode(AbstractType<?> t) udas()udfs()with(UserFunction fun) Create a Functions instance with the provided function addedwithAddedOrUpdated(UserFunction function) without(FunctionName name, List<AbstractType<?>> argTypes) Creates a Functions instance with the function with the provided name and argument types removedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
builder
-
none
-
iterator
- Specified by:
iteratorin interfaceIterable<UserFunction>
-
stream
-
size
public int size() -
udfs
- Returns:
- a stream of keyspace's UDFs
-
udas
- Returns:
- a stream of keyspace's UDAs
-
referencingUserType
-
withUpdatedUserType
-
aggregatesUsingFunction
- Parameters:
function- the referree function- Returns:
- a stream of aggregates that use the provided function as either a state or a final function
-
get
Get all function overloads with the specified name- Parameters:
name- fully qualified function name- Returns:
- an empty list if the function name is not found; a non-empty collection of
Functionotherwise
-
getUdfs
Get all UDFs overloads with the specified name- Parameters:
name- fully qualified function name- Returns:
- an empty list if the function name is not found; a non-empty collection of
UDFunctionotherwise
-
getUdas
Get all UDAs overloads with the specified name- Parameters:
name- fully qualified function name- Returns:
- an empty list if the function name is not found; a non-empty collection of
UDAggregateotherwise
-
find
-
find
public Optional<UserFunction> find(FunctionName name, List<AbstractType<?>> argTypes, UserFunctions.Filter filter) Find the function with the specified name -
isEmpty
public boolean isEmpty() -
typeHashCode
-
typeHashCode
-
filter
-
with
Create a Functions instance with the provided function added -
without
Creates a Functions instance with the function with the provided name and argument types removed -
without
-
withAddedOrUpdated
-
equals
-
hashCode
public int hashCode() -
toString
-