Exemplo n.º 1
0
 public int GetLobCount()
 {
     lock (this)
     {
         this._sysLobSession.sessionContext.PushDynamicArguments(new object[0]);
         this._sysLobSession.sessionContext.Pop(false);
         RowSetNavigator navigator = this._getLobCount.Execute(this._sysLobSession).GetNavigator();
         if (!navigator.Next())
         {
             navigator.Close();
             return(0);
         }
         return(Convert.ToInt32(navigator.GetCurrent()[0]));
     }
 }
Exemplo n.º 2
0
        private long GetNewLobId()
        {
            Result result = this._getNextLobId.Execute(this._sysLobSession);

            if (result.IsError())
            {
                return(0L);
            }
            RowSetNavigator navigator = result.GetNavigator();

            if (!navigator.Next())
            {
                navigator.Close();
                return(0L);
            }
            return(Convert.ToInt64(navigator.GetCurrent()[0]));
        }
Exemplo n.º 3
0
        private object[] GetLobHeader(long lobId)
        {
            object[] args = new object[this._getLob.GetParametersMetaData().GetColumnCount()];
            args[0] = lobId;
            this._sysLobSession.sessionContext.PushDynamicArguments(args);
            Result result = this._getLob.Execute(this._sysLobSession);

            this._sysLobSession.sessionContext.Pop(false);
            if (result.IsError())
            {
                return(null);
            }
            RowSetNavigator navigator = result.GetNavigator();

            if (!navigator.Next())
            {
                navigator.Close();
                return(null);
            }
            return(navigator.GetCurrent());
        }
Exemplo n.º 4
0
        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);
        }