Skip to content

Commit ffeec0b

Browse files
authored
Merge branch 'release/7.6' into DOC-13093-Write-a-tutorial-for-SQL-migration
2 parents 6d09e1a + 6271552 commit ffeec0b

File tree

5 files changed

+104
-20
lines changed

5 files changed

+104
-20
lines changed

antora.yml

-13
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,3 @@ asciidoc:
44
attributes:
55
ui-name: Server Web Console
66
product-name: Server
7-
ext:
8-
preview:
9-
HEAD:
10-
sources:
11-
docs-server:
12-
branches: [release/7.6]
13-
backup:
14-
branches: [ master ]
15-
startPaths: docs
16-
override:
17-
startPage: server:introduction:intro.adoc
18-
19-

modules/n1ql/pages/n1ql-language-reference/metafun.adoc

+93
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,99 @@ FROM system:completed_requests;
703703
----
704704
====
705705

706+
[[hashbytes,HASHBYTES()]]
707+
708+
== HASHBYTES(`input`, [ `options` ])
709+
710+
=== Description
711+
712+
This function returns a binary hash value for a given input using a specified hashing algorithm.
713+
By using this function, you can verify or compare data quickly, or protect your data by masking its original form while still allowing verification or comparison.
714+
715+
=== Arguments
716+
717+
input:: A binary object or any {sqlpp} data type.
718+
The JSON marshalled value of the data is used as the input.
719+
720+
options:: [Optional]
721+
An object that specifies the hashing algorithm and other options for the function.
722+
If omitted, the default hashing algorithm is `sha256`.
723+
724+
=== Options
725+
726+
[options="header", cols="1a,3a,1a"]
727+
|===
728+
| Name | Description | Schema
729+
730+
| **algorithm** +
731+
__required__
732+
| Specifies the hashing algorithm to be used.
733+
734+
Supported algorithms are: `crc32`, `md4`, `md5`, `sha224`, `sha256`, `sha384`, `sha512`, `sha512/224`, and `sha512/256`.
735+
| String
736+
737+
| **polynomial** +
738+
__optional__
739+
| The polynomial to use.
740+
This only applies if the algorithm is `crc32`.
741+
This property may have one of the following values:
742+
743+
* `ieee` (the default value)
744+
* `castagnoli`
745+
* `koopman`
746+
* A valid 32-bit integer, provided either as a JSON number (decimal) or a string that can be parsed as a numeric value (supports hexadecimal with a "0x" prefix)
747+
748+
*Default:* `ieee`
749+
| String or integer
750+
|===
751+
752+
=== Return Value
753+
754+
A binary hash value.
755+
The size or length of the value depends on the algorithm you choose.
756+
757+
=== Examples
758+
759+
[[hashbytes-ex1,HASHBYTES() Example 1]]
760+
761+
.Find the hash value using the `sha256` algorithm
762+
====
763+
.Query
764+
[source,sqlpp]
765+
----
766+
SELECT HASHBYTES('Hello World', {"algorithm":"sha256"});
767+
----
768+
.Results
769+
[source,json]
770+
----
771+
[
772+
{
773+
"$1": "a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e"
774+
}
775+
]
776+
----
777+
====
778+
779+
[[hashbytes-ex2,HASHBYTES() Example 2]]
780+
781+
.Find the hash value using the `crc32` algorithm
782+
====
783+
.Query
784+
[source,sqlpp]
785+
----
786+
SELECT HASHBYTES("hello world", {"algorithm":"crc32", "polynomial":"koopman"});
787+
----
788+
.Results
789+
[source,json]
790+
----
791+
[
792+
{
793+
"$1": "df373d3c"
794+
}
795+
]
796+
----
797+
====
798+
706799
[[len,LEN()]]
707800
== LEN(`expression`)
708801

modules/n1ql/pages/n1ql-language-reference/searchfun.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ NOTE: From Couchbase Server 7.6 and later, when you use the SEARCH function, you
6464
You also do not need to match the analyzer in a query to the analyzer in the Search index for an analytic query.
6565
For more information about how to set the analyzer for a Search index, see xref:search:set-advanced-settings.adoc[] or the xref:search:search-index-params.adoc#mapping[Mapping Object].
6666

67+
[#search-function-arguments-section]
6768
=== Arguments
6869

6970
identifier::

modules/n1ql/pages/n1ql-language-reference/window.adoc

+5-7
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ include::partial$n1ql-language-reference/window-intro.adoc[tag=windows]
4141
.Window partitions and the window frame
4242
image::window-example.png[Table of query result set with numbered callouts]
4343

44-
// workaround for callout list with no callout references
45-
46-
[%hardbreaks]
47-
➀ The query result set.
48-
➁ Window partitions -- partitioned by `name`, ordered by `time`.
49-
➂ The current object.
50-
➃ The window frame -- between unbounded preceding and current object.
44+
[calloutlist]
45+
. The query result set.
46+
. Window partitions -- partitioned by `name`, ordered by `time`.
47+
. The current object.
48+
. The window frame -- between unbounded preceding and current object.
5149

5250
include::partial$n1ql-language-reference/window-intro.adoc[tag=functions]
5351

preview/HEAD.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sources:
2+
docs-server:
3+
branches: [release/7.6]
4+
override:
5+
startPage: server:introduction:intro.adoc

0 commit comments

Comments
 (0)