From 113c6998be50931d40935fb183a0c201f1d546d0 Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Fri, 25 Jan 2019 14:08:49 -0600 Subject: [PATCH] add Shift() to query docs --- docs/query-language.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/query-language.md b/docs/query-language.md index 82ffecd2a..4dd838727 100644 --- a/docs/query-language.md +++ b/docs/query-language.md @@ -594,6 +594,34 @@ Count(Row(stargazer=1)) * Result is the number of repositories that user 1 has starred. +#### Shift +**Spec:** + +``` +Shift(, [n=UINT]) +``` + +**Description:** + +Returns the row specified by `ROW_CALL` shifted by `n` bits. + +**Result Type:** object with attrs and columns + +attrs will always be empty + +**Examples:** + +Query all columns with a bit set in row 1 of the field `stargazer` +and shift the result by 2: +```request +Shift(Row(stargazer=1), n=2) +``` +```response +{"attrs":{},"columns":[12, 22]} +``` + +* columns are the repositories which user 1 has starred shifted by 2 bits. + #### TopN **Spec:**