-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
475 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
doc-surrealdb_versioned_docs/version-latest/surrealql/functions/database/bytes.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
sidebar_position: 3 | ||
sidebar_label: Bytes functions | ||
title: Bytes functions | SurrealQL | ||
description: These functions can be used when working with bytes. | ||
--- | ||
|
||
# Bytes functions | ||
|
||
These functions can be used when working with bytes in SurrealQL. | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th scope="col">Function</th> | ||
<th scope="col">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td scope="row" data-label="Function"><a href="#byteslen"><code>bytes::len()</code></a></td> | ||
<td scope="row" data-label="Description">Gives the length in bytes</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
## `bytes::len` | ||
|
||
The `bytes::len` function returns the length in bytes of a `bytes` value. | ||
|
||
|
||
```surql title="API DEFINITION" | ||
bytes::len(bytes) -> int | ||
``` | ||
|
||
The following example shows this function, and its output, when used in a [`RETURN`](/docs/surrealdb/surrealql/statements/return) statement: | ||
|
||
```surql | ||
RETURN [ | ||
bytes::len(<bytes>"Simple ASCII string"), | ||
bytes::len(<bytes>"οὐ γὰρ δυνατόν ἐστιν ἔτι καθεύδειν"), | ||
bytes::len(<bytes>"청춘예찬 靑春禮讚") | ||
]; | ||
``` | ||
|
||
```bash title="Output" | ||
[ 19, 67, 25 ] | ||
``` |
2 changes: 1 addition & 1 deletion
2
doc-surrealdb_versioned_docs/version-latest/surrealql/functions/database/count.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.