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


Java Statement.getMaxRows方法代码示例

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


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

示例1: TsfileQueryResultSet

import java.sql.Statement; //导入方法依赖的package包/类
public TsfileQueryResultSet(Statement statement, List<String> columnName, TSIService.Iface client,
							TS_SessionHandle sessionHandle, TSOperationHandle operationHandle, String sql,
							String aggregations, List<String> columnTypeList)
		throws SQLException {
	this.statement = statement;
	this.sql = sql;
	this.columnInfoList = new ArrayList<>();
	this.columnInfoMap = new HashMap<>();
	this.client = client;
	this.operationHandle = operationHandle;
	this.columnInfoList.add(TIMESTAMP_STR);
	this.columnInfoMap.put(TIMESTAMP_STR, 1);
	int index = 2;
	for (String name : columnName) {
		columnInfoList.add(name);
		if(!columnInfoMap.containsKey(name)){
			columnInfoMap.put(name, index++);
		}
	}
	this.maxRows = statement.getMaxRows();
	this.fetchSize = statement.getFetchSize();
	this.operationHandle = operationHandle;
	this.operationType = aggregations;
	this.columnTypeList = columnTypeList;
}
 
开发者ID:thulab,项目名称:iotdb-jdbc,代码行数:26,代码来源:TsfileQueryResultSet.java

示例2: setMaxRowsToReturn

import java.sql.Statement; //导入方法依赖的package包/类
/**
    * Set the maximum rows to return to the client side
    * 
    * @param statement
    *            the statement to set
    * @param databaseConfigurator
    *            the DatabaseConfigurator which contains the getMaxRowsToReturn()
    *            method
    * @throws SQLException
    */
   public static void setMaxRowsToReturn(Statement statement,
    DatabaseConfigurator databaseConfigurator) throws SQLException, IOException {

int maxRowsToReturn = DatabaseConfiguratorCall
	.getMaxRowsToReturn(databaseConfigurator);

if (maxRowsToReturn > 0) {
    if (statement.getMaxRows() == 0
	    || (statement.getMaxRows() > maxRowsToReturn)) {
	statement.setFetchSize(0); // To avoid any possible conflict
	statement.setMaxRows(maxRowsToReturn);
    }
}
   }
 
开发者ID:kawansoft,项目名称:aceql-http,代码行数:25,代码来源:ServerSqlUtil.java


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