public void AddIntersectionQueryParam(byte[] indexId, IntersectionQueryParams intersectionQueryParam) { if (intersectionQueryParamsMapping == null) { intersectionQueryParamsMapping = new Dictionary <byte[], IntersectionQueryParams>(new ByteArrayEqualityComparer()); } intersectionQueryParam.BaseQuery = this; intersectionQueryParamsMapping.Add(indexId, intersectionQueryParam); }
internal IntersectionQueryParams GetIntersectionQueryParamForIndexId(byte[] indexId) { IntersectionQueryParams retVal; if ((intersectionQueryParamsMapping == null) || !intersectionQueryParamsMapping.TryGetValue(indexId, out retVal)) { retVal = new IntersectionQueryParams(this); } return(retVal); }
public virtual void Deserialize(IPrimitiveReader reader, int version) { //TargetIndexName targetIndexName = reader.ReadString(); //IndexIdList ushort count = reader.ReadUInt16(); if (count > 0) { indexIdList = new List <byte[]>(count); ushort len; for (ushort i = 0; i < count; i++) { len = reader.ReadUInt16(); if (len > 0) { indexIdList.Add(reader.ReadBytes(len)); } } } //ExcludeData excludeData = reader.ReadBoolean(); //GetIndexHeader getIndexHeader = reader.ReadBoolean(); //PrimaryIdList count = reader.ReadUInt16(); if (count > 0) { primaryIdList = new List <int>(count); for (ushort i = 0; i < count; i++) { primaryIdList.Add(reader.ReadInt32()); } } //Filter byte b = reader.ReadByte(); if (b != 0) { FilterType filterType = (FilterType)b; filter = FilterFactory.CreateFilter(reader, filterType); } //IndexIdParamsMapping count = reader.ReadUInt16(); if (count > 0) { intersectionQueryParamsMapping = new Dictionary <byte[], IntersectionQueryParams>(count, new ByteArrayEqualityComparer()); byte[] indexId; IntersectionQueryParams intersectionQueryParam; ushort len; for (ushort i = 0; i < count; i++) { len = reader.ReadUInt16(); indexId = null; if (len > 0) { indexId = reader.ReadBytes(len); intersectionQueryParam = new IntersectionQueryParams(); Serializer.Deserialize(reader.BaseStream, intersectionQueryParam); intersectionQueryParamsMapping.Add(indexId, intersectionQueryParam); } } } if (version >= 2) { //FullDataIdInfo fullDataIdInfo = new FullDataIdInfo(); Serializer.Deserialize(reader.BaseStream, fullDataIdInfo); } }
public virtual void Deserialize(IPrimitiveReader reader, int version) { //TargetIndexName targetIndexName = reader.ReadString(); //IndexIdList ushort count = reader.ReadUInt16(); if (count > 0) { indexIdList = new List<byte[]>(count); ushort len; for (ushort i = 0; i < count; i++) { len = reader.ReadUInt16(); if (len > 0) { indexIdList.Add(reader.ReadBytes(len)); } } } //ExcludeData excludeData = reader.ReadBoolean(); //GetIndexHeader getIndexHeader = reader.ReadBoolean(); //PrimaryIdList count = reader.ReadUInt16(); if (count > 0) { primaryIdList = new List<int>(count); for (ushort i = 0; i < count; i++) { primaryIdList.Add(reader.ReadInt32()); } } //Filter byte b = reader.ReadByte(); if (b != 0) { FilterType filterType = (FilterType)b; filter = FilterFactory.CreateFilter(reader, filterType); } //IndexIdParamsMapping count = reader.ReadUInt16(); if (count > 0) { intersectionQueryParamsMapping = new Dictionary<byte[], IntersectionQueryParams>(count, new ByteArrayEqualityComparer()); byte[] indexId; IntersectionQueryParams intersectionQueryParam; ushort len; for (ushort i = 0; i < count; i++) { len = reader.ReadUInt16(); indexId = null; if (len > 0) { indexId = reader.ReadBytes(len); intersectionQueryParam = new IntersectionQueryParams(); Serializer.Deserialize(reader.BaseStream, intersectionQueryParam); intersectionQueryParamsMapping.Add(indexId, intersectionQueryParam); } } } if (version >= 2) { //FullDataIdInfo fullDataIdInfo = new FullDataIdInfo(); Serializer.Deserialize(reader.BaseStream, fullDataIdInfo); } }
public void AddIntersectionQueryParam(byte[] indexId, IntersectionQueryParams intersectionQueryParam) { if (intersectionQueryParamsMapping == null) { intersectionQueryParamsMapping = new Dictionary<byte[], IntersectionQueryParams>(new ByteArrayEqualityComparer()); } intersectionQueryParam.BaseQuery = this; intersectionQueryParamsMapping.Add(indexId, intersectionQueryParam); }
internal IntersectionQueryParams GetIntersectionQueryParamForIndexId(byte[] indexId) { IntersectionQueryParams retVal; if ((intersectionQueryParamsMapping == null) || !intersectionQueryParamsMapping.TryGetValue(indexId, out retVal)) { retVal = new IntersectionQueryParams(this); } return retVal; }
public virtual void Deserialize(IPrimitiveReader reader, int version) { //TargetIndexName TargetIndexName = reader.ReadString(); //IndexIdList ushort count = reader.ReadUInt16(); if (count > 0) { IndexIdList = new List <byte[]>(count); ushort len; for (ushort i = 0; i < count; i++) { len = reader.ReadUInt16(); if (len > 0) { IndexIdList.Add(reader.ReadBytes(len)); } } } //ExcludeData ExcludeData = reader.ReadBoolean(); //GetIndexHeader GetIndexHeader = reader.ReadBoolean(); //PrimaryIdList count = reader.ReadUInt16(); if (count > 0) { PrimaryIdList = new List <int>(count); for (ushort i = 0; i < count; i++) { PrimaryIdList.Add(reader.ReadInt32()); } } //Filter byte b = reader.ReadByte(); if (b != 0) { FilterType filterType = (FilterType)b; Filter = FilterFactory.CreateFilter(reader, filterType); } //IndexIdParamsMapping count = reader.ReadUInt16(); if (count > 0) { intersectionQueryParamsMapping = new Dictionary <byte[], IntersectionQueryParams>(count, new ByteArrayEqualityComparer()); byte[] indexId; IntersectionQueryParams intersectionQueryParam; ushort len; for (ushort i = 0; i < count; i++) { len = reader.ReadUInt16(); indexId = null; if (len > 0) { indexId = reader.ReadBytes(len); intersectionQueryParam = new IntersectionQueryParams(); Serializer.Deserialize(reader.BaseStream, intersectionQueryParam); intersectionQueryParamsMapping.Add(indexId, intersectionQueryParam); } } } if (version == 2) { //FullDataIdInfo FullDataIdInfo = new FullDataIdInfo(); Serializer.Deserialize(reader.BaseStream, FullDataIdInfo); } if (version >= 3) { //FullDataIdInfo if (reader.ReadBoolean()) { FullDataIdInfo = new FullDataIdInfo(); Serializer.Deserialize(reader.BaseStream, FullDataIdInfo); } //Count Count = reader.ReadInt32(); //MaxResultItems MaxResultItems = reader.ReadInt32(); //CanApplyMaxResultItemsOnServer IsSingleClusterQuery = reader.ReadBoolean(); //IndexCondition if (reader.ReadBoolean()) { IndexCondition = new IndexCondition(); Serializer.Deserialize(reader.BaseStream, IndexCondition); } } if (version >= 4) { //DomainSpecificProcessingType DomainSpecificProcessingType = (DomainSpecificProcessingType)reader.ReadByte(); } }