java.sql.ResultSet.moveToInsertRow()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(229)

本文整理了Java中java.sql.ResultSet.moveToInsertRow方法的一些代码示例,展示了ResultSet.moveToInsertRow的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResultSet.moveToInsertRow方法的具体详情如下:
包路径:java.sql.ResultSet
类名称:ResultSet
方法名:moveToInsertRow

ResultSet.moveToInsertRow介绍

[英]Moves the cursor position to the Insert Row. The current position is remembered and the cursor is positioned at the Insert Row. The columns in the Insert Row should be filled in with the appropriate update methods, before calling insertRow to insert the new row into the database.
[中]将光标位置移动到插入行。将记住当前位置,并将光标定位在插入行。在调用insertRow将新行插入数据库之前,应使用适当的更新方法填充Insert行中的列。

代码示例

代码示例来源:origin: codingapi/tx-lcn

@Override
public void moveToInsertRow() throws SQLException {
 delegate.moveToInsertRow();
}

代码示例来源:origin: querydsl/querydsl

@Override
public void moveToInsertRow() throws SQLException {
  rs.moveToInsertRow();
}

代码示例来源:origin: alibaba/druid

@Override
public void moveToInsertRow() throws SQLException {
  try {
    rs.moveToInsertRow();
  } catch (Throwable t) {
    throw checkException(t);
  }
}

代码示例来源:origin: apache/ignite

@Override public void run() throws Exception {
    rs.moveToInsertRow();
  }
});

代码示例来源:origin: alibaba/druid

@Override
public void resultSet_moveToInsertRow(ResultSetProxy resultSet) throws SQLException {
  if (this.pos < filterSize) {
    nextFilter().resultSet_moveToInsertRow(this, resultSet);
    return;
  }
  resultSet.getResultSetRaw().moveToInsertRow();
}

代码示例来源:origin: apache/groovy

/**
 * Adds a new row to the result set
 *
 * @param values a map containing the mappings for column names and values
 * @throws java.sql.SQLException if something goes wrong
 * @see ResultSet#insertRow()
 * @see ResultSet#updateObject(java.lang.String, java.lang.Object)
 * @see ResultSet#moveToInsertRow()
 */
public void add(Map values) throws SQLException {
  getResultSet().moveToInsertRow();
  for (Iterator iter = values.entrySet().iterator(); iter.hasNext();) {
    Map.Entry entry = (Map.Entry) iter.next();
    getResultSet().updateObject(entry.getKey().toString(), entry.getValue());
  }
  getResultSet().insertRow();
}

代码示例来源:origin: com.h2database/h2

boolean insert = row < 0;
if (insert) {
  rs.moveToInsertRow();
} else {
  rs.absolute(row);

代码示例来源:origin: Meituan-Dianping/Zebra

@Override
public void moveToInsertRow() throws SQLException {
  innerResultSet.moveToInsertRow();
}

代码示例来源:origin: Meituan-Dianping/Zebra

@Override
public void moveToInsertRow() throws SQLException {
  innerResultSet.moveToInsertRow();
}

代码示例来源:origin: apache/phoenix

@Override
public void moveToInsertRow() throws SQLException {
  rs.moveToInsertRow();
}

代码示例来源:origin: p6spy/p6spy

@Override
public void moveToInsertRow() throws SQLException {
 delegate.moveToInsertRow();
}

代码示例来源:origin: com.alibaba/druid

@Override
public void moveToInsertRow() throws SQLException {
  try {
    rs.moveToInsertRow();
  } catch (Throwable t) {
    throw checkException(t);
  }
}

代码示例来源:origin: AxonFramework/AxonFramework

/**
 * Inserts a new token entry via the given updatable {@code resultSet}.
 *
 * @param resultSet     the updatable result set to add the entry to
 * @param token         the token of the entry to insert
 * @param processorName the name of the processor to insert a token for
 * @param segment       the segment of the processor to insert a token for
 * @return the tracking token of the inserted entry
 *
 * @throws SQLException when an exception occurs while inserting a token entry
 */
protected TrackingToken insertTokenEntry(ResultSet resultSet, TrackingToken token, String processorName,
                     int segment) throws SQLException {
  AbstractTokenEntry<?> entry = new GenericTokenEntry<>(token, serializer, contentType, processorName, segment);
  entry.claim(nodeId, claimTimeout);
  resultSet.moveToInsertRow();
  resultSet.updateObject(schema.tokenColumn(), token == null ? null : entry.getSerializedToken().getData());
  resultSet.updateString(schema.tokenTypeColumn(),
              token == null ? null : entry.getSerializedToken().getType().getName());
  resultSet.updateString(schema.timestampColumn(), entry.timestampAsString());
  resultSet.updateString(schema.ownerColum(), entry.getOwner());
  resultSet.updateString(schema.processorNameColumn(), processorName);
  resultSet.updateInt(schema.segmentColumn(), segment);
  resultSet.insertRow();
  return token;
}

代码示例来源:origin: com.alibaba/druid

@Override
public void resultSet_moveToInsertRow(ResultSetProxy resultSet) throws SQLException {
  if (this.pos < filterSize) {
    nextFilter().resultSet_moveToInsertRow(this, resultSet);
    return;
  }
  resultSet.getResultSetRaw().moveToInsertRow();
}

代码示例来源:origin: commons-dbutils/commons-dbutils

/**
 * @throws SQLException
 * @see java.sql.ResultSet#moveToInsertRow()
 */
protected final void moveToInsertRow() throws SQLException {
  rs.moveToInsertRow();
}

代码示例来源:origin: apache/activemq-artemis

@Override
public void moveToInsertRow() throws SQLException {
 logger.logf(level, "%s.moveToInsertRow()", resultSetID);
 resultSet.moveToInsertRow();
}

代码示例来源:origin: org.apache.commons/commons-dbcp2

@Override
public void moveToInsertRow() throws SQLException {
  try {
    resultSet.moveToInsertRow();
  } catch (final SQLException e) {
    handleException(e);
  }
}

代码示例来源:origin: org.tranql/tranql-connector

public void moveToInsertRow() throws SQLException {
  try {
    rs.moveToInsertRow();
  } catch (SQLException e) {
    connectionError(e);
    throw e;
  }
}

代码示例来源:origin: org.arrahtec/osdq-core

public void moveToInsertRow()
 throws SQLException
{
 checkState();
 this.rs.moveToInsertRow();
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-connector

public void moveToInsertRow() throws SQLException
{
 checkState();
 try
 {
   resultSet.moveToInsertRow();
 }
 catch (Throwable t)
 {
   throw checkException(t);
 }
}

相关文章

微信公众号

最新文章

更多

ResultSet类方法