public SyncExecution ReadCopy <T>(TpccTableKey key, out T record)
            where T : TpccTablePayload
        {
            TpccTablePayload payload;

            this.ReadCopyImpl(key, out payload);
            record = payload as T;
            return(this);
        }
 protected override SyncExecution ReadCopyImpl(
     TpccTableKey key, out TpccTablePayload record)
 {
     if (!Read(key, out record).IsAborted())
     {
         record = this.GetObjectPool(
             key.Table.Type()).GetCopy(record) as TpccTablePayload;
     }
     return(this);
 }
Beispiel #3
0
            void BuildAuxIndex(TpccTableKey k, TpccTablePayload v)
            {
                var cpk = k as CustomerPkey;
                var cpl = v as CustomerPayload;

                Debug.Assert(k != null && v != null);
                var lastNameKey =
                    CustomerLastNameIndexKey.FromPKeyAndPayload(cpk, cpl);
                uint cid = cpk.C_ID;

                AddToStore(lastNameKey, cid);
            }
        public SyncExecution Read <T>(TpccTableKey key, out T record)
            where T : TpccTablePayload
        {
            object payload = this.txExec.SyncRead(key.Table.Name(), key);

            record = payload as T;
            if (!this.IsAborted())
            {
                if (payload == null)
                {
                    return(this.Abort());
                }
                Debug.Assert(record != null);
            }
            return(this);
        }
Beispiel #5
0
 void BuildAuxIndex(TpccTableKey k, TpccTablePayload v)
 {
 }
 protected virtual SyncExecution ReadCopyImpl(
     TpccTableKey key, out TpccTablePayload record)
 {
     return(this.Read(key, out record));
 }
 public SyncExecution Insert(TpccTableKey key, TpccTablePayload record)
 {
     this.txExec.InitAndInsert(key.Table.Name(), key, record);
     return(this);
 }
 public SyncExecution Update(TpccTableKey key, TpccTablePayload record)
 {
     this.txExec.Update(key.Table.Name(), key, record);
     return(this);
 }