-
Notifications
You must be signed in to change notification settings - Fork 1
/
AQueryRecord.cs
48 lines (39 loc) · 1.17 KB
/
AQueryRecord.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using Aerospike.Client;
using Aerospike.Database.LINQPadDriver.Extensions;
using System;
using System.Collections.Generic;
using System.Text;
using LPU = LINQPad.Util;
namespace Aerospike.Database.LINQPadDriver.Extensions
{
/// <summary>
/// A class used to represent Query records
/// </summary>
/// <typeparam name="T"></typeparam>
public class AQueryRecord<T> : AQueryRecord
where T : ARecord
{
public AQueryRecord(object idxKey, IEnumerable<T> records)
: base(idxKey, records)
{
}
override protected object ToDump()
{
return LPU.ToExpando(this, include: "IdxKey,Records", exclude: "key");
}
}
public class AQueryRecord
{
public AQueryRecord(object idxKey, IEnumerable<ARecord> records)
{
this.IdxKey = idxKey.ToAValue();
this.Records = records;
}
public IEnumerable<ARecord> Records { get; }
public AValue IdxKey { get; }
virtual protected object ToDump()
{
return LPU.ToExpando(this, include: "IdxKey,Records", exclude: "key");
}
}
}