Beispiel #1
0
        public ulong GetQueryHash(JsonOperationContext ctx)
        {
            using (var hasher = new HashCalculator(ctx))
            {
                hasher.Write(Query);
                hasher.Write(WaitForNonStaleResults);
                hasher.Write(SkipDuplicateChecking);
                hasher.Write(WaitForNonStaleResultsTimeout?.Ticks);
                hasher.Write(Start);
                hasher.Write(PageSize);
                hasher.Write(QueryParameters);

                return(hasher.GetHash());
            }
        }
Beispiel #2
0
        public ulong GetQueryHash(JsonOperationContext ctx, DocumentConventions conventions, IJsonSerializer serializer)
        {
            using (var hasher = new HashCalculator(ctx))
            {
                hasher.Write(Query);
                hasher.Write(WaitForNonStaleResults);
                hasher.Write(SkipDuplicateChecking);
                hasher.Write(WaitForNonStaleResultsTimeout?.Ticks);
#pragma warning disable 618
                hasher.Write(Start);
                hasher.Write(PageSize);
#pragma warning restore 618
                hasher.Write(QueryParameters, conventions, serializer);

                return(hasher.GetHash());
            }
        }
Beispiel #3
0
        public ulong GetQueryHash(JsonOperationContext ctx)
        {
            using (var hasher = new HashCalculator(ctx))
            {
                hasher.Write(Query);
                hasher.Write(WaitForNonStaleResults);
                hasher.Write(SkipDuplicateChecking);
#if FEATURE_SHOW_TIMINGS
                hasher.Write(ShowTimings);
#endif
#if FEATURE_EXPLAIN_SCORES
                hasher.Write(ExplainScores);
#endif
                hasher.Write(WaitForNonStaleResultsTimeout?.Ticks);
                hasher.Write(Start);
                hasher.Write(PageSize);
                hasher.Write(QueryParameters);

                return(hasher.GetHash());
            }
        }