public RowSetNavigatorClient GetRowSetSlice(long id, int offset, int count) { RowSetNavigator source = this._resultMap[id].GetNavigator(); if ((offset + count) > source.GetSize()) { count = source.GetSize() - offset; } return(new RowSetNavigatorClient(source, offset, count)); }
public override Result GetResult(Session session) { Result result = null; RowSetNavigator generatedNavigator = null; IPersistentStore rowStore = base.BaseTable.GetRowStore(session); if (base.GeneratedIndexes != null) { result = Result.NewUpdateCountResult(base.generatedResultMetaData, 0); generatedNavigator = result.GetChainedResult().GetNavigator(); } if (this.IsSimpleInsert) { SqlType[] columnTypes = base.BaseTable.GetColumnTypes(); object[] data = base.GetInsertData(session, columnTypes, base.InsertExpression.nodes[0].nodes); return(base.InsertSingleRow(session, rowStore, data)); } RowSetNavigator newData = (base.queryExpression == null) ? this.GetInsertValuesNavigator(session) : this.GetInsertSelectNavigator(session); if (newData.GetSize() > 0) { base.InsertRowSet(session, generatedNavigator, newData); } if (base.BaseTable.TriggerLists[0].Length != 0) { base.BaseTable.FireTriggers(session, 0, newData); } if (result == null) { result = new Result(1, newData.GetSize()); } else { result.SetUpdateCount(newData.GetSize()); } return(result); }
private int[][] GetBlockAddresses(long lobId, int offset, int limit) { object[] args = new object[this._getLobPart.GetParametersMetaData().GetColumnCount()]; args[0] = lobId; args[1] = offset; args[2] = limit; this._sysLobSession.sessionContext.PushDynamicArguments(args); this._sysLobSession.sessionContext.Pop(false); RowSetNavigator navigator = this._getLobPart.Execute(this._sysLobSession).GetNavigator(); int size = navigator.GetSize(); int[][] numArray = new int[size][]; for (int i = 0; i < size; i++) { navigator.Absolute(i); object[] current = navigator.GetCurrent(); numArray[i] = new int[] { Convert.ToInt32(current[0]), Convert.ToInt32(current[1]), Convert.ToInt32(current[2]) }; } navigator.Close(); return(numArray); }