本文整理汇总了Java中org.hsqldb.SessionInterface.execute方法的典型用法代码示例。如果您正苦于以下问题:Java SessionInterface.execute方法的具体用法?Java SessionInterface.execute怎么用?Java SessionInterface.execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.SessionInterface
的用法示例。
在下文中一共展示了SessionInterface.execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: length
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long length(SessionInterface session) {
if (length > -1) {
return length;
}
ResultLob resultOut = ResultLob.newLobGetLengthRequest(id);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
length = ((ResultLob) resultIn).getBlockLength();
return length;
}
示例2: setChars
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void setChars(SessionInterface session, long pos, char[] chars,
int offset, int len) {
if (offset != 0 || len != chars.length) {
if (!isInLimits(chars.length, offset, len)) {
throw Error.error(ErrorCode.X_22001);
}
if (offset != 0 || len != chars.length) {
char[] newChars = new char[len];
System.arraycopy(chars, offset, newChars, 0, len);
chars = newChars;
}
}
ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, chars);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
this.length = ((ResultLob) resultIn).getBlockLength();
}
示例3: setBytes
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void setBytes(SessionInterface session, long pos, byte[] bytes,
int offset, int len) {
if (offset != 0 || len != bytes.length) {
if (!BinaryData.isInLimits(bytes.length, offset, len)) {
throw new IndexOutOfBoundsException();
}
byte[] newbytes = new byte[len];
System.arraycopy(bytes, offset, newbytes, 0, len);
bytes = newbytes;
}
ResultLob resultOut = ResultLob.newLobSetBytesRequest(id, pos, bytes);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
length = ((ResultLob) resultIn).getBlockLength();
}
示例4: setString
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
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();
}
示例5: position
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, ClobData searchstr,
long start) {
ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id,
searchstr.getId(), start);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getOffset();
}
示例6: getClob
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public ClobData getClob(SessionInterface session, long position,
long length) {
ResultLob resultOut = ResultLob.newLobGetRequest(id, position, length);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return new ClobDataID(((ResultLob) resultIn).getLobID());
}
示例7: getClob
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public ClobData getClob(SessionInterface session, long position,
long length) {
ResultLob resultOut = ResultLob.newLobGetRequest(id, position, length);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
long lobID = ((ResultLob) resultIn).getLobID();
return new ClobDataID(lobID);
}
示例8: setBytes
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
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;
}
示例9: setString
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void 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();
}
this.length = ((ResultLob) resultIn).getBlockLength();
}
示例10: position
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, String searchstr,
long start) {
ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id,
searchstr.toCharArray(), start);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getOffset();
}
示例11: position
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, byte[] pattern,
long start) {
ResultLob resultOut = ResultLob.newLobGetBytePatternPositionRequest(id,
pattern, start);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getOffset();
}
示例12: truncate
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void truncate(SessionInterface session, long len) {
ResultLob resultOut = ResultLob.newLobTruncateRequest(id, len);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
}
示例13: getBytes
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public byte[] getBytes(SessionInterface session, long pos, int length) {
ResultLob resultOut = ResultLob.newLobGetBytesRequest(id, pos, length);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw Error.error(resultIn);
}
return ((ResultLob) resultIn).getByteArray();
}
示例14: length
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long length(SessionInterface session) {
ResultLob resultOut = ResultLob.newLobGetLengthRequest(id);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getBlockLength();
}
示例15: position
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
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();
}