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


Java PlainSelect.getStringList方法代码示例

本文整理汇总了Java中net.sf.jsqlparser.statement.select.PlainSelect.getStringList方法的典型用法代码示例。如果您正苦于以下问题:Java PlainSelect.getStringList方法的具体用法?Java PlainSelect.getStringList怎么用?Java PlainSelect.getStringList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.jsqlparser.statement.select.PlainSelect的用法示例。


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

示例1: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
public String toString() {
    String sql = "";
    String ifNotExistsStr = this.tableIfNotExists ? "IF NOT EXISTS " : "";
    String orReplaceStr = this.orReplaceTable ? "DROP TABLE " + table + ";\n" : "";
    sql += orReplaceStr;
    sql += "CREATE TABLE " + ifNotExistsStr + table + " (";

    sql += PlainSelect.getStringList(columnDefinitions, true, false);
    if (indexes != null && indexes.size() != 0) {
        sql += ", ";
        sql += PlainSelect.getStringList(indexes);
    }
    sql += ") ";
    sql += PlainSelect.getStringList(tableOptionsStrings, false, false);

    return sql;
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:18,代码来源:CreateTable.java

示例2: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
	String referenceOptions = "";
	if(onDeleteReferenceOption != null) {
		referenceOptions += " ON DELETE " + onDeleteReferenceOption;
	}
	if(onUpdateReferenceOption != null) {
		referenceOptions += " ON UPDATE " + onUpdateReferenceOption;
	}
	return super.toString()
			+ " REFERENCES " + table + PlainSelect.getStringList(getReferencedColumnNames(), true, true)
			+ referenceOptions;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:14,代码来源:ForeignKeyIndex.java

示例3: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
    String sql;
    String createOps = PlainSelect.getStringList(createOptionsStrings, false, false);

    sql = "CREATE " + (unlogged ? "UNLOGGED " : "") + 
            (!"".equals(createOps)?createOps + " ":"") +
            "TABLE " + (ifNotExists?"IF NOT EXISTS ":"") + table;

    if (select != null) {
        sql += " AS " + select.toString();
    } else {
        sql += " (";

        sql += PlainSelect.getStringList(columnDefinitions, true, false);
        if (indexes != null && !indexes.isEmpty()) {
            sql += ", ";
            sql += PlainSelect.getStringList(indexes);
        }
        sql += ")";
        String options = PlainSelect.getStringList(tableOptionsStrings, false, false);
        if (options != null && options.length() > 0) {
            sql += " " + options;
        }
    }

    return sql;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:29,代码来源:CreateTable.java

示例4: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
    StringBuilder arraySpec = new StringBuilder();
    for (Integer item : arrayData) {
        arraySpec.append("[");
        if (item != null) {
            arraySpec.append(item);
        }
        arraySpec.append("]");
    }
    return dataType
            + (argumentsStringList != null ? " " + PlainSelect.getStringList(argumentsStringList, true, true) : "")
            + arraySpec.toString()
            + (characterSet != null ? " CHARACTER SET " + characterSet : "");
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:16,代码来源:ColDataType.java

示例5: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
	String sql = "DROP " + type + " "
          + (ifExists?"IF EXISTS ":"") + name.toString();

	if (parameters != null && !parameters.isEmpty()) {
		sql += " " + PlainSelect.getStringList(parameters);
	}

	return sql;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:12,代码来源:Drop.java

示例6: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
public String toString() {
	String sql = "";

	sql = "INSERT INTO ";
	sql += table+" ";
	sql += ((columns!=null)?PlainSelect.getStringList(columns, true, true)+" ":"");
	
	if(useValues) {
		sql += "VALUES "+itemsList+"";
	} else {
		sql += ""+itemsList+"";
	}
	
	return sql;
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:16,代码来源:Insert.java

示例7: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
public String toString() {
	String sql = "REPLACE "+table;
	
	if(expressions != null && columns != null ) {
		//the SET col1=exp1, col2=exp2 case
		sql += " SET ";
		//each element from expressions match up with a column from columns.
		for (int i = 0, s = columns.size(); i < s; i++) {
			sql += ""+columns.get(i)+"="+expressions.get(i);
			sql += (i<s-1)?", ":"";
		}
	}
	else if( columns != null ) {
		//the REPLACE mytab (col1, col2) [...] case 
		sql += " "+PlainSelect.getStringList(columns, true, true);
	}
	
	if( itemsList != null ) {
		//REPLACE mytab SELECT * FROM mytab2
		//or VALUES ('as', ?, 565)
		
		if( useValues ) {
			sql += " VALUES";
		}
		
		sql += " "+itemsList;
	}
	
	return sql;
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:31,代码来源:Replace.java

示例8: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
public String toString() {
	String sql = "DROP "+type+" "+name;
	
	if( parameters != null && parameters.size() > 0) {
		sql += " "+PlainSelect.getStringList(parameters);
	}
	
	return sql;
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:10,代码来源:Drop.java

示例9: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
    return (getCommentCase() != null ? getCommentCase() + " " : "") + "CASE "
            + ((switchExpression != null) ? switchExpression + " " : "")
            + PlainSelect.getStringList(whenClauses, false, false) + " "
            + ((elseExpression != null) ? (getCommentElse() != null ? getCommentElse() + " " : "")
            + "ELSE " + elseExpression + " " : "")
            + (getCommentEnd() != null ? getCommentEnd() + " " : "") + "END";
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:10,代码来源:CaseExpression.java

示例10: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
	return PlainSelect.getStringList(expressions, true, true);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:ExpressionList.java

示例11: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
	return "CASE " + ((switchExpression != null) ? switchExpression + " " : "")
			+ PlainSelect.getStringList(whenClauses, false, false) + " "
			+ ((elseExpression != null) ? "ELSE " + elseExpression + " " : "") + "END";
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:7,代码来源:CaseExpression.java

示例12: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
	return columnName + " " + colDataType + (columnSpecStrings != null ? " " + PlainSelect.getStringList(columnSpecStrings, false, false) : "");
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:ColumnDefinition.java

示例13: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
    String idxSpecText = PlainSelect.getStringList(getIndexSpec(), false, false);
    return (getName() != null ? "CONSTRAINT " + getName() + " " : "")
            + getType() + " " + PlainSelect.getStringList(getColumnsNames(), true, true) + (!"".equals(idxSpecText) ? " " + idxSpecText : "");
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:7,代码来源:NamedConstraint.java

示例14: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
       String idxSpecText = PlainSelect.getStringList(idxSpec, false, false);
	return type + (name != null ? " " + name : "") + " " + PlainSelect.getStringList(columnsNames, true, true) + (!"".equals(idxSpecText)?" " + idxSpecText:"");
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:6,代码来源:Index.java

示例15: toString

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public String toString() {
    return " WHEN NOT MATCHED THEN INSERT " + PlainSelect.getStringList(columns, true, true)
            + " VALUES " + PlainSelect.getStringList(values, true, true);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:6,代码来源:MergeInsert.java


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