Esempio n. 1
0
        public SRecord Get(long pos)
        {
            var rc = _Get(pos) as SRecord ??
                     throw new Exception("Record " + SDbObject._Uid(pos) + " never defined");
            var tb = objects[rc.table] as STable ??
                     throw new Exception("Table " + rc.table + " has been dropped");

            if (!tb.rows.Contains(rc.Defpos))
            {
                throw new Exception("Record " + SDbObject._Uid(pos) + " has been dropped");
            }
            var dp = tb.rows[rc.Defpos];

            if (dp == pos)
            {
                return(rc);
            }
            return((SRecord)_Get(dp));
        }
Esempio n. 2
0
 internal static string Uid(long uid)
 {
     return(SDbObject._Uid(uid));
 }