Codota Logo
AlterTableStatement.getTables
Code IndexAdd Codota to your IDE (free)

How to use
getTables
method
in
org.apache.shardingsphere.core.parsing.antlr.sql.statement.ddl.AlterTableStatement

Best Java code snippets using org.apache.shardingsphere.core.parsing.antlr.sql.statement.ddl.AlterTableStatement.getTables (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: apache/incubator-shardingsphere

/**
 * Find column definition from meta data.
 *
 * @param columnName column name
 * @param shardingTableMetaData sharding table meta data
 * @return column definition
 */
public Optional<ColumnDefinitionSegment> findColumnDefinitionFromMetaData(final String columnName, final ShardingTableMetaData shardingTableMetaData) {
  if (!shardingTableMetaData.containsTable(getTables().getSingleTableName())) {
    return Optional.absent();
  }
  for (ColumnMetaData each : shardingTableMetaData.get(getTables().getSingleTableName()).getColumns().values()) {
    if (columnName.equalsIgnoreCase(each.getColumnName())) {
      return Optional.of(new ColumnDefinitionSegment(columnName, each.getDataType(), each.isPrimaryKey()));
    }
  }
  return Optional.absent();
}

origin: apache/incubator-shardingsphere

private void refreshTableMetaData(final AlterTableStatement alterTableStatement) {
  String logicTableName = alterTableStatement.getTables().getSingleTableName();
  TableMetaData newTableMetaData = TableMetaDataFactory.newInstance(alterTableStatement, getMetaData().getTable().get(logicTableName));
  Optional<String> newTableName = alterTableStatement.getNewTableName();
  if (newTableName.isPresent()) {
    getMetaData().getTable().put(newTableName.get(), newTableMetaData);
    getMetaData().getTable().remove(logicTableName);
  } else {
    getMetaData().getTable().put(logicTableName, newTableMetaData);
  }
}

origin: apache/incubator-shardingsphere

private void refreshTableMetaData(final AlterTableStatement alterTableStatement) {
  String logicTableName = alterTableStatement.getTables().getSingleTableName();
  TableMetaData newTableMetaData = TableMetaDataFactory.newInstance(alterTableStatement, getMetaData().getTable().get(logicTableName));
  Optional<String> newTableName = alterTableStatement.getNewTableName();
  if (newTableName.isPresent()) {
    getMetaData().getTable().put(newTableName.get(), newTableMetaData);
    getMetaData().getTable().remove(logicTableName);
  } else {
    getMetaData().getTable().put(logicTableName, newTableMetaData);
  }
}

origin: apache/incubator-shardingsphere

private void refreshTableMetaData(final ShardingContext shardingContext, final AlterTableStatement alterTableStatement) {
  String logicTableName = alterTableStatement.getTables().getSingleTableName();
  TableMetaData newTableMetaData = TableMetaDataFactory.newInstance(alterTableStatement, shardingContext.getMetaData().getTable().get(logicTableName));
  Optional<String> newTableName = alterTableStatement.getNewTableName();
  if (newTableName.isPresent()) {
    shardingContext.getMetaData().getTable().put(newTableName.get(), newTableMetaData);
    shardingContext.getMetaData().getTable().remove(logicTableName);
  } else {
    shardingContext.getMetaData().getTable().put(logicTableName, newTableMetaData);
  }
}

org.apache.shardingsphere.core.parsing.antlr.sql.statement.ddlAlterTableStatementgetTables

Popular methods of AlterTableStatement

  • getNewTableName
    Get new table name.
  • findColumnDefinition
    Find column definition.
  • findColumnDefinitionFromCurrentAddClause
  • findColumnDefinitionFromMetaData
    Find column definition from meta data.
  • getAddedColumnDefinitions
  • getChangedPositionColumns
  • getDroppedColumnNames
  • getModifiedColumnDefinitions
  • isDropPrimaryKey
  • setDropPrimaryKey
  • setNewTableName
  • setNewTableName

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
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