当前位置: 首页>>代码示例>>Java>>正文


Java SQLName.toString方法代码示例

本文整理汇总了Java中com.alibaba.druid.sql.ast.SQLName.toString方法的典型用法代码示例。如果您正苦于以下问题:Java SQLName.toString方法的具体用法?Java SQLName.toString怎么用?Java SQLName.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.alibaba.druid.sql.ast.SQLName的用法示例。


在下文中一共展示了SQLName.toString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import com.alibaba.druid.sql.ast.SQLName; //导入方法依赖的package包/类
public boolean visit(MySqlDeleteStatement x) {
    setAliasMap();

    setMode(x, Mode.Delete);

    accept(x.getFrom());
    accept(x.getUsing());
    x.getTableSource().accept(this);

    if (x.getTableSource() instanceof SQLExprTableSource) {
        SQLName tableName = (SQLName) ((SQLExprTableSource) x.getTableSource()).getExpr();
        String ident = tableName.toString();
        setCurrentTable(x, ident);

        TableStat stat = this.getTableStat(ident,ident);
        stat.incrementDeleteCount();
    }

    accept(x.getWhere());

    accept(x.getOrderBy());
    accept(x.getLimit());

    return false;
}
 
开发者ID:huang-up,项目名称:mycat-src-1.6.1-RELEASE,代码行数:26,代码来源:MycatSchemaStatVisitor.java

示例2: visit

import com.alibaba.druid.sql.ast.SQLName; //导入方法依赖的package包/类
@Override
public boolean visit(MySqlDeleteStatement x) {
    setAliasMap();

    accept(x.getFrom());
    accept(x.getUsing());
    x.getTableSource().accept(this);

    if (x.getTableSource() instanceof SQLExprTableSource) {
        SQLName tableName = (SQLName) ((SQLExprTableSource) x.getTableSource()).getExpr();
        String ident = tableName.toString();
        setCurrentTable(x, ident);
    }

    accept(x.getWhere());

    accept(x.getOrderBy());
    accept(x.getLimit());

    return false;
}
 
开发者ID:actiontech,项目名称:dble,代码行数:22,代码来源:ServerSchemaStatVisitor.java

示例3: influenceKeyColumn

import com.alibaba.druid.sql.ast.SQLName; //导入方法依赖的package包/类
/**
 * this function is check if the name is the important column in any tables
 * true -- the column influence some important column
 * false -- safe
 */
private boolean influenceKeyColumn(SQLName name, SchemaConfig schema, String tableName) {
    String columnName = name.toString();
    Map<String, TableConfig> tableConfig = schema.getTables();
    TableConfig changedTable = tableConfig.get(tableName);
    if (changedTable == null) {
        return false;
    }
    if (columnName.equalsIgnoreCase(changedTable.getPartitionColumn()) ||
            columnName.equalsIgnoreCase(changedTable.getJoinKey())) {
        return true;
    }
    // Traversal all the table node to find if some table is the child table of the changedTale
    for (Map.Entry<String, TableConfig> entry : tableConfig.entrySet()) {
        TableConfig tb = entry.getValue();
        if (tb.getParentTC() != null &&
                tableName.equalsIgnoreCase(tb.getParentTC().getName()) &&
                columnName.equalsIgnoreCase(tb.getParentKey())) {
            return true;
        }
    }
    return false;
}
 
开发者ID:actiontech,项目名称:dble,代码行数:28,代码来源:DruidAlterTableParser.java


注:本文中的com.alibaba.druid.sql.ast.SQLName.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。