use of org.hsqldb_voltpatches.result.ResultLob in project voltdb by VoltDB.
the class BlobDataID method position.
public long position(SessionInterface session, byte[] pattern, long start) {
ResultLob resultOut = ResultLob.newLobGetBytePatternPositionRequest(id, pattern, start);
ResultLob resultIn = (ResultLob) session.execute(resultOut);
return resultIn.getOffset();
}
use of org.hsqldb_voltpatches.result.ResultLob in project voltdb by VoltDB.
the class ClobDataID method setString.
public int setString(SessionInterface session, long pos, String str, int offset, int len) {
if (!isInLimits(str.length(), offset, len)) {
throw Error.error(ErrorCode.X_22001);
}
ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, str.substring(offset, len).toCharArray());
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return str.length();
}
use of org.hsqldb_voltpatches.result.ResultLob in project voltdb by VoltDB.
the class ClobDataID method getChars.
public char[] getChars(SessionInterface session, long position, int length) {
ResultLob resultOut = ResultLob.newLobGetCharsRequest(id, position, length);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getCharArray();
}
use of org.hsqldb_voltpatches.result.ResultLob in project voltdb by VoltDB.
the class ClobDataID method setString.
public int setString(SessionInterface session, long pos, String str) {
ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, str.toCharArray());
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return str.length();
}
use of org.hsqldb_voltpatches.result.ResultLob in project voltdb by VoltDB.
the class BlobDataID method setBytes.
public int setBytes(SessionInterface session, long pos, byte[] bytes, int offset, int len) {
ResultLob resultOut = ResultLob.newLobSetBytesRequest(id, pos, bytes);
Result resultIn = (ResultLob) session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return bytes.length;
}
Aggregations