• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IndexColumnName类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName的典型用法代码示例。如果您正苦于以下问题:Java IndexColumnName类的具体用法?Java IndexColumnName怎么用?Java IndexColumnName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

IndexColumnName类属于com.alibaba.cobar.parser.ast.fragment.ddl.index包,在下文中一共展示了IndexColumnName类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: indexDefinition

点赞 3

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
private IndexDefinition indexDefinition() throws SQLSyntaxErrorException {
    IndexDefinition.IndexType indexType = null;
    List<IndexColumnName> columns = new ArrayList<IndexColumnName>(1);
    if (lexer.token() == KW_USING) {
        lexer.nextToken();
        int tp = matchIdentifier("BTREE", "HASH");
        indexType = tp == 0 ? IndexDefinition.IndexType.BTREE : IndexDefinition.IndexType.HASH;
    }
    match(PUNC_LEFT_PAREN);
    for (int i = 0; lexer.token() != PUNC_RIGHT_PAREN; ++i) {
        if (i > 0) match(PUNC_COMMA);
        IndexColumnName indexColumnName = indexColumnName();
        columns.add(indexColumnName);
    }
    match(PUNC_RIGHT_PAREN);
    List<IndexOption> options = indexOptions();
    return new IndexDefinition(indexType, columns, options);
}
 

开发者ID:loye168,
项目名称:tddl5,
代码行数:19,
代码来源:MySQLDDLParser.java

示例2: indexColumnName

点赞 3

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
private IndexColumnName indexColumnName() throws SQLSyntaxErrorException {
    // col_name [(length)] [ASC | DESC]
    Identifier colName = identifier();
    Expression len = null;
    if (lexer.token() == PUNC_LEFT_PAREN) {
        lexer.nextToken();
        len = exprParser.expression();
        match(PUNC_RIGHT_PAREN);
    }
    switch (lexer.token()) {
        case KW_ASC:
            lexer.nextToken();
            return new IndexColumnName(colName, len, true);
        case KW_DESC:
            lexer.nextToken();
            return new IndexColumnName(colName, len, false);
        default:
            return new IndexColumnName(colName, len, true);
    }
}
 

开发者ID:loye168,
项目名称:tddl5,
代码行数:21,
代码来源:MySQLDDLParser.java

示例3: indexColumnName

点赞 3

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
private IndexColumnName indexColumnName() throws SQLSyntaxErrorException {
    //        col_name [(length)] [ASC | DESC]
    Identifier colName = identifier();
    Expression len = null;
    if (lexer.token() == PUNC_LEFT_PAREN) {
        lexer.nextToken();
        len = exprParser.expression();
        match(PUNC_RIGHT_PAREN);
    }
    switch (lexer.token()) {
        case KW_ASC:
            lexer.nextToken();
            return new IndexColumnName(colName, len, true);
        case KW_DESC:
            lexer.nextToken();
            return new IndexColumnName(colName, len, false);
        default:
            return new IndexColumnName(colName, len, true);
    }
}
 

开发者ID:beebeandwer,
项目名称:TDDL,
代码行数:21,
代码来源:MySQLDDLParser.java

示例4: indexDefinition

点赞 3

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
private IndexDefinition indexDefinition() throws SQLSyntaxErrorException {
    IndexDefinition.IndexType indexType = null;
    List<IndexColumnName> columns = new ArrayList<IndexColumnName>(1);
    if (lexer.token() == KW_USING) {
        lexer.nextToken();
        int tp = matchIdentifier("BTREE", "HASH");
        indexType = tp == 0 ? IndexDefinition.IndexType.BTREE : IndexDefinition.IndexType.HASH;
    }
    match(PUNC_LEFT_PAREN);
    for (int i = 0; lexer.token() != PUNC_RIGHT_PAREN; ++i) {
        if (i > 0)
            match(PUNC_COMMA);
        IndexColumnName indexColumnName = indexColumnName();
        columns.add(indexColumnName);
    }
    match(PUNC_RIGHT_PAREN);
    List<IndexOption> options = indexOptions();
    return new IndexDefinition(indexType, columns, options);
}
 

开发者ID:alibaba,
项目名称:cobar,
代码行数:20,
代码来源:MySQLDDLParser.java

示例5: indexColumnName

点赞 3

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
private IndexColumnName indexColumnName() throws SQLSyntaxErrorException {
    // col_name [(length)] [ASC | DESC]
    Identifier colName = identifier();
    Expression len = null;
    if (lexer.token() == PUNC_LEFT_PAREN) {
        lexer.nextToken();
        len = exprParser.expression();
        match(PUNC_RIGHT_PAREN);
    }
    switch (lexer.token()) {
    case KW_ASC:
        lexer.nextToken();
        return new IndexColumnName(colName, len, true);
    case KW_DESC:
        lexer.nextToken();
        return new IndexColumnName(colName, len, false);
    default:
        return new IndexColumnName(colName, len, true);
    }
}
 

开发者ID:alibaba,
项目名称:cobar,
代码行数:21,
代码来源:MySQLDDLParser.java

示例6: visit

点赞 2

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
@Override
public void visit(IndexColumnName node) {
    // QS_TODO
}
 

开发者ID:loye168,
项目名称:tddl5,
代码行数:5,
代码来源:MySQLOutputASTVisitor.java

示例7: visit

点赞 2

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
@Override
public void visit(IndexColumnName indexColumnName) {
}
 

开发者ID:loye168,
项目名称:tddl5,
代码行数:4,
代码来源:EmptySQLASTVisitor.java

示例8: visit

点赞 2

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
@Override
public void visit(IndexColumnName node) {
}
 

开发者ID:alibaba,
项目名称:cobar,
代码行数:4,
代码来源:PartitionKeyVisitor.java

示例9: visit

点赞 1

import com.alibaba.cobar.parser.ast.fragment.ddl.index.IndexColumnName; //导入依赖的package包/类
void visit(IndexColumnName node); 

开发者ID:loye168,
项目名称:tddl5,
代码行数:2,
代码来源:SQLASTVisitor.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)