示例#1
0
 public void DeleteTopic(int topicId)
 {
     Do(c =>
     {
         var t = c.BeginTransaction();
         PayloadHelper.DeleteAll(c, t, topicId);
         TopicHelper.Delete(c, t, topicId);
         t.Commit();
     });
 }
示例#2
0
 public void DeletePayloads(int topicId)
 {
     Do(c => { PayloadHelper.DeleteAll(c, null, topicId); });
 }
示例#3
0
 public void CreatePayload(Payload p)
 {
     Do(c => PayloadHelper.Insert(c, p));
 }
示例#4
0
 public Payload GetRecord(int recId)
 {
     return(Do(c => PayloadHelper.Select(c, recId)));
 }
示例#5
0
 public IEnumerable <Payload> GetPayloads(string topicName, long?startTime, long?stopTime)
 {
     return(Do(c => PayloadHelper.SelectAllByTopicAndTimestamp(c, topicName, startTime, stopTime)));
 }
示例#6
0
 public Payload GetPayload(string topicName, long?startTime, long?stopTime)
 {
     return(Do(c => PayloadHelper.SelectAllByTopicAndTimestampLast(c, topicName, startTime, stopTime)));
 }