public virtual STransaction Delete(STransaction tr)
 {
     return(tr); // no changes here
 }
 public virtual RowSet RowSet(STransaction tr, SQuery top, SDict <long, SFunction> ags, Context cx)
 {
     throw new NotImplementedException();
 }
 public SearchRowSet(STransaction tr, SQuery top, SSearch sc, SDict <long, SFunction> ags, Context cx)
     : this(Source(tr, top, sc, ags, cx), sc, ags)
 {
 }
 public virtual STransaction Update(STransaction tr, SDict <string, Serialisable> assigs)
 {
     return(tr); // no changes here
 }
 public override STransaction Update(STransaction tr, SDict <string, Serialisable> assigs)
 {
     return((STransaction)tr.Install(new SUpdate(tr, _ob.rec ?? throw new System.Exception("No record"), assigs), tr.curpos)); // ok
 }
            public override STransaction Delete(STransaction tr)
            {
                var rc = _ob.rec ?? throw new System.Exception("No record");

                return((STransaction)tr.Install(new SDelete(tr, rc.table, rc.Defpos), tr.curpos)); // ok
            }
 public TableRowSet(STransaction db, STable t)
     : base(db + t.uid /*read constraint*/, t,
            SDict <long, SFunction> .Empty, t.rows.Length)
 {
     _tb = t;
 }
Example #8
0
 protected STransaction(STransaction tr, long u) : base(tr)
 {
     autoCommit      = tr.autoCommit;
     uid             = tr.uid;
     readConstraints = tr.readConstraints + (u, true);
 }
 public override STransaction Update(STransaction tr, SDict <string, Serialisable> assigs)
 {
     throw new System.NotImplementedException();
 }
 public override STransaction Delete(STransaction tr)
 {
     throw new System.NotImplementedException();
 }
 public RowSet(STransaction tr, SQuery q, SDict <long, SFunction> ags, int?n) : base(n)
 {
     _tr = tr; _qry = q; _aggregates = ags;
 }
Example #12
0
 public SDatabase MaybeAutoCommit(STransaction tr)
 {
     return(tr.autoCommit ? tr.Commit() : tr);
 }
Example #13
0
 public STransaction(STransaction tr, SRole r) : base(tr, tr.objects, r, tr.curpos)
 {
     autoCommit      = tr.autoCommit;
     uid             = tr.uid;
     readConstraints = tr.readConstraints;
 }
 public SQuery(Types t, STransaction tr) : base(t, tr)
 {
     display = SDict <int, string> .Empty;
     cpos    = SDict <int, Serialisable> .Empty;
     names   = SDict <string, Serialisable> .Empty;
 }
 public IndexRowSet(STransaction tr, STable t, SIndex ix, SCList <Variant> key, SList <Serialisable> wh)
     : base(Rdc(tr, ix, key), t, SDict <long, SFunction> .Empty, t.rows.Length)
 {
     _ix     = ix; _key = key; _wh = wh;
     _unique = key.Length == _ix.cols.Length;
 }
 public override RowSet RowSet(STransaction tr, SQuery top, SDict <long, SFunction> ags, Context cx)
 {
     return(new GroupRowSet(tr, top, this, ags, cx));
 }
Example #17
0
 public override STransaction Commit(STransaction tr, int c, AStream f)
 {
     return(base.Commit(tr, f));
 }