public final boolean equalsNativeFunction(FunctionName nativeFunction) { assert nativeFunction.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME); if (this.hasKeyspace() && !this.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME)) return false; return Objects.equal(this.name, nativeFunction.name); }
public final boolean equalsNativeFunction(FunctionName nativeFunction) { assert nativeFunction.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME); if (this.hasKeyspace() && !this.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME)) return false; return Objects.equal(this.name, nativeFunction.name); }
public final boolean equalsNativeFunction(FunctionName nativeFunction) { assert nativeFunction.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME); if (this.hasKeyspace() && !this.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME)) return false; return Objects.equal(this.name, nativeFunction.name); }
public final boolean equalsNativeFunction(FunctionName nativeFunction) { assert nativeFunction.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME); if (this.hasKeyspace() && !this.keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME)) return false; return Objects.equal(this.name, nativeFunction.name); }
/** * Find the function with the specified name * * @param name fully qualified function name * @param argTypes function argument types * @return an empty {@link Optional} if the keyspace or the function name are not found; * a non-empty optional of {@link Function} otherwise */ public Optional<Function> findFunction(FunctionName name, List<AbstractType<?>> argTypes) { if (!name.hasKeyspace()) throw new IllegalArgumentException(String.format("Function name must be fully quallified: got %s", name)); KeyspaceMetadata ksm = getKSMetaData(name.keyspace); return ksm == null ? Optional.empty() : ksm.functions.find(name, argTypes); }
/** * Get all function overloads with the specified name * * @param name fully qualified function name * @return an empty list if the keyspace or the function name are not found; * a non-empty collection of {@link Function} otherwise */ public Collection<Function> getFunctions(FunctionName name) { if (!name.hasKeyspace()) throw new IllegalArgumentException(String.format("Function name must be fully quallified: got %s", name)); KeyspaceMetadata ksm = getKSMetaData(name.keyspace); return ksm == null ? Collections.emptyList() : ksm.functions.get(name); }
/** * Get all function overloads with the specified name * * @param name fully qualified function name * @return an empty list if the keyspace or the function name are not found; * a non-empty collection of {@link Function} otherwise */ public Collection<Function> getFunctions(FunctionName name) { if (!name.hasKeyspace()) throw new IllegalArgumentException(String.format("Function name must be fully quallified: got %s", name)); KeyspaceMetadata ksm = getKSMetaData(name.keyspace); return ksm == null ? Collections.emptyList() : ksm.functions.get(name); }
/** * Get all function overloads with the specified name * * @param name fully qualified function name * @return an empty list if the keyspace or the function name are not found; * a non-empty collection of {@link Function} otherwise */ public Collection<Function> getFunctions(FunctionName name) { if (!name.hasKeyspace()) throw new IllegalArgumentException(String.format("Function name must be fully quallified: got %s", name)); KeyspaceMetadata ksm = getKSMetaData(name.keyspace); return ksm == null ? Collections.emptyList() : ksm.functions.get(name); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getRawKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getRawKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
@Override public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
@Override public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
@Override public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getRawKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); stateFunc = new FunctionName(functionName.keyspace, stateFunc.name); if (finalFunc != null) finalFunc = new FunctionName(functionName.keyspace, finalFunc.name); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); stateFunc = new FunctionName(functionName.keyspace, stateFunc.name); if (finalFunc != null) finalFunc = new FunctionName(functionName.keyspace, finalFunc.name); }
public void prepareKeyspace(ClientState state) throws InvalidRequestException { if (!functionName.hasKeyspace() && state.getRawKeyspace() != null) functionName = new FunctionName(state.getKeyspace(), functionName.name); if (!functionName.hasKeyspace()) throw new InvalidRequestException("Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"); ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace); stateFunc = new FunctionName(functionName.keyspace, stateFunc.name); if (finalFunc != null) finalFunc = new FunctionName(functionName.keyspace, finalFunc.name); }