java.sql.Clob.truncate()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(203)

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

Clob.truncate介绍

[英]Truncates this Clob after the specified number of characters.
[中]在指定的字符数之后截断此Clob。

代码示例

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

@Override
public void clob_truncate(ClobProxy clob, long len) throws SQLException {
  if (this.pos < filterSize) {
    nextFilter().clob_truncate(this, clob, len);
    return;
  }
  clob.getRawClob().truncate(len);
}

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

@Override
public void clob_truncate(ClobProxy clob, long len) throws SQLException {
  if (this.pos < filterSize) {
    nextFilter().clob_truncate(this, clob, len);
    return;
  }
  clob.getRawClob().truncate(len);
}

代码示例来源:origin: io.snappydata/gemfirexd-core

/**
 * {@inheritDoc}
 */
@Override
public void truncate(long len) throws SQLException {
 this.clob.truncate(len);
}

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

/** 
 * @see java.sql.Clob#truncate(long)
 */
public void truncate(long len) throws SQLException {
  this.reference.truncate(len);
}

代码示例来源:origin: org.teiid/teiid-common-core

/** 
 * @see java.sql.Clob#truncate(long)
 */
public void truncate(long len) throws SQLException {
  this.reference.truncate(len);
}

代码示例来源:origin: io.snappydata/gemfirexd

/**
 * {@inheritDoc}
 */
@Override
public void truncate(long len) throws SQLException {
 this.clob.truncate(len);
}

代码示例来源:origin: co.paralleluniverse/comsat-jdbc

@Override
  public Void call() throws SQLException {
    clob.truncate(len);
    return null;
  }
});

代码示例来源:origin: io.snappydata/snappydata-store-core

/**
 * {@inheritDoc}
 */
@Override
public void truncate(long len) throws SQLException {
 this.clob.truncate(len);
}

代码示例来源:origin: io.snappydata/gemfirexd-core

/**
 * truncates the Clob value represented by LOCATOR to have a length
 * of length.
 *
 * @param LOCATOR an integer that represents the LOCATOR used to retrieve an
 *                instance of the LOB.
 * @param length an integer that represents the length to which the Clob
 *               must be truncated to.
 * @throws SQLException
 */
public static void CLOBTRUNCATE(int LOCATOR, long length) throws SQLException {
  getClobObjectCorrespondingtoLOCATOR(LOCATOR).truncate(length);
}

代码示例来源:origin: io.snappydata/snappydata-store-core

/**
 * truncates the Clob value represented by LOCATOR to have a length
 * of length.
 *
 * @param LOCATOR an integer that represents the LOCATOR used to retrieve an
 *                instance of the LOB.
 * @param length an integer that represents the length to which the Clob
 *               must be truncated to.
 * @throws SQLException
 */
public static void CLOBTRUNCATE(int LOCATOR, long length) throws SQLException {
  getClobObjectCorrespondingtoLOCATOR(LOCATOR).truncate(length);
}

代码示例来源:origin: io.snappydata/gemfirexd

/**
 * truncates the Clob value represented by LOCATOR to have a length
 * of length.
 *
 * @param LOCATOR an integer that represents the LOCATOR used to retrieve an
 *                instance of the LOB.
 * @param length an integer that represents the length to which the Clob
 *               must be truncated to.
 * @throws SQLException
 */
public static void CLOBTRUNCATE(int LOCATOR, long length) throws SQLException {
  getClobObjectCorrespondingtoLOCATOR(LOCATOR).truncate(length);
}

代码示例来源:origin: stackoverflow.com

ResultSet rs = null;
 try
 {
   rs = stmt.executeQuery ();
   rs.next ();
   Clob clob = rs.getClob (1);
   clob.truncate (0);
   clob.setString (1, data);
 }
 finally
 {
   rs = DBUtil.close (rs);
 }

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

public void truncate(long len) throws SQLException {
  getWrappedClob().truncate(len);
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public void truncate(long len) throws SQLException {
  getWrappedClob().truncate(len);
}

代码示例来源:origin: liukaixuan/guzz

public void truncate(long len) throws SQLException {
  getWrappedClob().truncate(len) ;
}

代码示例来源:origin: com.amazon.carbonado/carbonado

public void setLength(long length) throws PersistException {
  // FIXME: Add special code to support increasing length
  try {
    getInternalClobForPersist().truncate(length);
  } catch (SQLException e) {
    throw mRepo.toPersistException(e);
  }
}

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

public void setLength(long length) throws PersistException {
  // FIXME: Add special code to support increasing length
  try {
    getInternalClobForPersist().truncate(length);
  } catch (SQLException e) {
    throw mRepo.toPersistException(e);
  }
}

代码示例来源:origin: org.vx68k.quercus/quercus

/**
 * Truncates large object
 */
public boolean truncate(Env env,
            @Optional("0") long length)
{
 try {
  switch (_type) {
  case OracleModule.OCI_D_FILE:
   break;
  case OracleModule.OCI_D_LOB:
   if (_lob instanceof Blob) {
    Blob blob = (Blob) _lob;
    blob.truncate(length);
   } else if (_lob instanceof Clob) {
    Clob clob = (Clob) _lob;
    clob.truncate(length);
   }
   break;
  case OracleModule.OCI_D_ROWID:
   break;
  }
  return true;
 } catch (Exception ex) {
  log.log(Level.FINE, ex.toString(), ex);
  return false;
 }
}

代码示例来源:origin: org.vx68k.quercus/quercus

} else if (_lob instanceof Clob) {
 Clob clob = (Clob) _lob;
 clob.truncate(0);

相关文章