Codota Logo
DropFunctionStatement
Code IndexAdd Codota to your IDE (free)

How to use
DropFunctionStatement
in
org.apache.cassandra.cql3.statements

Best Java code snippets using org.apache.cassandra.cql3.statements.DropFunctionStatement (Showing top 9 results out of 315)

  • Common ways to obtain DropFunctionStatement
private void myMethod () {
DropFunctionStatement d =
  • Codota IconCql.Parser parser;parser.dropFunctionStatement()
  • Codota IconFunctionName functionName;List argRawTypes;new DropFunctionStatement(functionName, argRawTypes, argsPresent, ifExists)
  • Smart code suggestions by Codota
}
origin: org.apache.cassandra/cassandra-all

public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException
{
  Function old = findFunction();
  if (old == null)
  {
    if (ifExists)
      return null;
    else
      throw new InvalidRequestException(getMissingFunctionError());
  }
  KeyspaceMetadata ksm = Schema.instance.getKSMetaData(old.name().keyspace);
  Collection<UDAggregate> referrers = ksm.functions.aggregatesUsingFunction(old);
  if (!referrers.isEmpty())
    throw new InvalidRequestException(String.format("Function '%s' still referenced by %s", old, referrers));
  MigrationManager.announceFunctionDrop((UDFunction) old, isLocalOnly);
  return new Event.SchemaChange(Event.SchemaChange.Change.DROPPED, Event.SchemaChange.Target.FUNCTION,
                 old.name().keyspace, old.name().name, AbstractType.asCQLTypeStringList(old.argTypes()));
}
origin: com.strapdata.cassandra/cassandra-all

public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
  Function function = findFunction();
  if (function == null)
  {
    if (!ifExists)
      throw new InvalidRequestException(String.format("Unconfigured function %s.%s(%s)",
                              functionName.keyspace,
                              functionName.name,
                              Joiner.on(",").join(argRawTypes)));
  }
  else
  {
    state.ensureHasPermission(Permission.DROP, FunctionResource.function(function.name().keyspace,
                                       function.name().name,
                                       function.argTypes()));
  }
}
origin: org.apache.cassandra/cassandra-all

expr = new DropFunctionStatement(fn, argsTypes, argsPresent, ifExists); 
origin: org.apache.cassandra/cassandra-all

public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
  Function function = findFunction();
  if (function == null)
  {
    if (!ifExists)
      throw new InvalidRequestException(String.format("Unconfigured function %s.%s(%s)",
                              functionName.keyspace,
                              functionName.name,
                              Joiner.on(",").join(argRawTypes)));
  }
  else
  {
    state.ensureHasPermission(Permission.DROP, FunctionResource.function(function.name().keyspace,
                                       function.name().name,
                                       function.argTypes()));
  }
}
origin: com.strapdata.cassandra/cassandra-all

expr = new DropFunctionStatement(fn, argsTypes, argsPresent, ifExists); 
origin: com.strapdata.cassandra/cassandra-all

public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException
{
  Function old = findFunction();
  if (old == null)
  {
    if (ifExists)
      return null;
    else
      throw new InvalidRequestException(getMissingFunctionError());
  }
  KeyspaceMetadata ksm = Schema.instance.getKSMetaData(old.name().keyspace);
  Collection<UDAggregate> referrers = ksm.functions.aggregatesUsingFunction(old);
  if (!referrers.isEmpty())
    throw new InvalidRequestException(String.format("Function '%s' still referenced by %s", old, referrers));
  MigrationManager.announceFunctionDrop((UDFunction) old, isLocalOnly);
  return new Event.SchemaChange(Event.SchemaChange.Change.DROPPED, Event.SchemaChange.Target.FUNCTION,
                 old.name().keyspace, old.name().name, AbstractType.asCQLTypeStringList(old.argTypes()));
}
origin: jsevellec/cassandra-unit

public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
  Function function = findFunction();
  if (function == null)
  {
    if (!ifExists)
      throw new InvalidRequestException(String.format("Unconfigured function %s.%s(%s)",
                              functionName.keyspace,
                              functionName.name,
                              Joiner.on(",").join(argRawTypes)));
  }
  else
  {
    state.ensureHasPermission(Permission.DROP, FunctionResource.function(function.name().keyspace,
                                       function.name().name,
                                       function.argTypes()));
  }
}
origin: jsevellec/cassandra-unit

expr = new DropFunctionStatement(fn, argsTypes, argsPresent, ifExists); 
origin: jsevellec/cassandra-unit

public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException
{
  Function old = findFunction();
  if (old == null)
  {
    if (ifExists)
      return null;
    else
      throw new InvalidRequestException(getMissingFunctionError());
  }
  KeyspaceMetadata ksm = Schema.instance.getKSMetaData(old.name().keyspace);
  Collection<UDAggregate> referrers = ksm.functions.aggregatesUsingFunction(old);
  if (!referrers.isEmpty())
    throw new InvalidRequestException(String.format("Function '%s' still referenced by %s", old, referrers));
  MigrationManager.announceFunctionDrop((UDFunction) old, isLocalOnly);
  return new Event.SchemaChange(Event.SchemaChange.Change.DROPPED, Event.SchemaChange.Target.FUNCTION,
                 old.name().keyspace, old.name().name, AbstractType.asCQLTypeStringList(old.argTypes()));
}
org.apache.cassandra.cql3.statementsDropFunctionStatement

Javadoc

A DROP FUNCTION statement parsed from a CQL query.

Most used methods

  • <init>
  • findFunction
  • getMissingFunctionError

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now