本文整理汇总了Java中org.hsqldb.navigator.RowSetNavigatorClient.add方法的典型用法代码示例。如果您正苦于以下问题:Java RowSetNavigatorClient.add方法的具体用法?Java RowSetNavigatorClient.add怎么用?Java RowSetNavigatorClient.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.navigator.RowSetNavigatorClient
的用法示例。
在下文中一共展示了RowSetNavigatorClient.add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInsertValuesNavigator
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertValuesNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
//
Expression[] list = insertExpression.nodes;
RowSetNavigatorClient newData = new RowSetNavigatorClient(list.length);
for (int j = 0; j < list.length; j++) {
Expression[] rowArgs = list[j].nodes;
Object[] data = getInsertData(session, colTypes, rowArgs);
newData.add(data);
}
return newData;
}
示例2: getInsertSelectNavigator
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
int[] columnMap = insertColumnMap;
//
Result result = queryExpression.getResult(session, 0);
RowSetNavigator nav = result.initialiseNavigator();
Type[] sourceTypes = result.metaData.columnTypes;
RowSetNavigatorClient newData =
new RowSetNavigatorClient(nav.getSize());
while (nav.hasNext()) {
Object[] data = baseTable.getNewRowData(session);
Object[] sourceData = nav.getNext();
for (int i = 0; i < columnMap.length; i++) {
int j = columnMap[i];
if (j == this.overrideUserValue) {
continue;
}
Type sourceType = sourceTypes[i];
data[j] = colTypes[j].convertToType(session, sourceData[i],
sourceType);
}
newData.add(data);
}
return newData;
}
示例3: getInsertSelectNavigator
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
int[] columnMap = insertColumnMap;
//
Result result = queryExpression.getResult(session, 0);
RowSetNavigator nav = result.initialiseNavigator();
Type[] sourceTypes = result.metaData.columnTypes;
RowSetNavigatorClient newData = new RowSetNavigatorClient(2);
while (nav.hasNext()) {
Object[] data = baseTable.getNewRowData(session);
Object[] sourceData = (Object[]) nav.getNext();
for (int i = 0; i < columnMap.length; i++) {
int j = columnMap[i];
Type sourceType = sourceTypes[i];
data[j] = colTypes[j].convertToType(session, sourceData[i],
sourceType);
}
newData.add(data);
}
return newData;
}
示例4: getInsertValuesNavigator
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertValuesNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
int[] columnMap = insertColumnMap;
//
Expression[] list = insertExpression.nodes;
RowSetNavigatorClient newData = new RowSetNavigatorClient(list.length);
for (int j = 0; j < list.length; j++) {
Expression[] rowArgs = list[j].nodes;
Object[] data = baseTable.getNewRowData(session);
session.sessionData.startRowProcessing();
for (int i = 0; i < rowArgs.length; i++) {
Expression e = rowArgs[i];
int colIndex = columnMap[i];
if (e.getType() == OpTypes.DEFAULT) {
if (baseTable.identityColumn == colIndex) {
continue;
}
data[colIndex] =
baseTable.colDefaults[colIndex].getValue(session);
continue;
}
data[colIndex] = colTypes[colIndex].convertToType(session,
e.getValue(session), e.getDataType());
}
newData.add(data);
}
return newData;
}
示例5: getInsertSelectNavigator
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
int[] columnMap = insertColumnMap;
//
Result result = queryExpression.getResult(session, 0);
RowSetNavigator nav = result.initialiseNavigator();
Type[] sourceTypes = result.metaData.columnTypes;
RowSetNavigatorClient newData = new RowSetNavigatorClient(2);
while (nav.hasNext()) {
Object[] data = baseTable.getNewRowData(session);
Object[] sourceData = (Object[]) nav.getNext();
for (int i = 0; i < columnMap.length; i++) {
int j = columnMap[i];
if (j == this.overrideUserValue) {
continue;
}
Type sourceType = sourceTypes[i];
data[j] = colTypes[j].convertToType(session, sourceData[i],
sourceType);
}
newData.add(data);
}
return newData;
}
示例6: newColumnResult
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
private Result newColumnResult(long position,
int count) throws SQLException {
if (!JDBCClobClient.isInLimits(data.length, position, count)) {
throw JDBCUtil.outOfRangeArgument();
}
Type[] types = new Type[2];
types[0] = Type.SQL_INTEGER;
types[1] = elementType;
ResultMetaData meta = ResultMetaData.newSimpleResultMetaData(types);
meta.columnLabels = new String[] {
"C1", "C2"
};
meta.colIndexes = new int[] {
-1, -1
};
meta.columns = new ColumnBase[2];
for (int i = 0; i < meta.columns.length; i++) {
ColumnBase column = new ColumnBase("", "", "", "");
column.setType(types[i]);
meta.columns[i] = column;
}
RowSetNavigatorClient navigator = new RowSetNavigatorClient();
for (int i = (int) position; i < position + count; i++) {
Object[] rowData = new Object[2];
rowData[0] = Integer.valueOf(i + 1);
rowData[1] = data[i];
navigator.add(rowData);
}
Result result = Result.newDataResult(meta);
result.setNavigator(navigator);
return result;
}
示例7: newColumnResult
import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
private Result newColumnResult(long position,
int count) throws SQLException {
if (!JDBCClobClient.isInLimits(data.length, position, count)) {
throw Util.outOfRangeArgument();
}
Type[] types = new Type[2];
types[0] = Type.SQL_INTEGER;
types[1] = elementType;
ResultMetaData meta = ResultMetaData.newSimpleResultMetaData(types);
meta.columnLabels = new String[] {
"C1", "C2"
};
meta.colIndexes = new int[] {
-1, -1
};
meta.columns = new ColumnBase[2];
for (int i = 0; i < meta.columns.length; i++) {
ColumnBase column = new ColumnBase("", "", "", "");
column.setType(types[i]);
meta.columns[i] = column;
}
RowSetNavigatorClient navigator = new RowSetNavigatorClient();
for (int i = (int) position; i < position + count; i++) {
Object[] rowData = new Object[2];
rowData[0] = Integer.valueOf(i + 1);
rowData[1] = data[i];
navigator.add(rowData);
}
Result result = Result.newDataResult(meta);
result.setNavigator(navigator);
return result;
}