[sql] consolidate the encoders to a single function

This commit is contained in:
Tim Stack 2022-07-30 13:18:55 -07:00
parent c9c573d2ad
commit 3b9bc57ab0
13 changed files with 479 additions and 388 deletions

View File

@ -659,46 +659,6 @@ avg(*X*)
---- ----
.. _base64_encode:
base64_encode(*value*)
^^^^^^^^^^^^^^^^^^^^^^
Base-64 encode the given value
**Parameters**
* **value\*** --- The value to encode
**Examples**
To encode 'Hello, World!':
.. code-block:: custsqlite
;SELECT base64_encode('Hello, World!')
ée
**See Also**
:ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
----
.. _base64_encode:
base64_encode(*value*)
^^^^^^^^^^^^^^^^^^^^^^
Base-64 decode the given value
**Parameters**
* **value\*** --- The value to decode
**See Also**
:ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
----
.. _basename: .. _basename:
basename(*path*) basename(*path*)
@ -812,7 +772,7 @@ char(*X*)
HI HI
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -845,7 +805,7 @@ charindex(*needle*, *haystack*, *\[start\]*)
0 0
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -993,6 +953,31 @@ datetime(*timestring*, *modifier*)
---- ----
.. _decode:
decode(*value*, *algorithm*)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Decode the value using the given algorithm
**Parameters**
* **value\*** --- The value to decode
* **algorithm\*** --- One of the following encoding algorithms: base64, hex, uri
**Examples**
To decode the URI-encoded string '%63%75%72%6c':
.. code-block:: custsqlite
;SELECT decode('%63%75%72%6c', 'uri')
curl
**See Also**
:ref:`char`, :ref:`charindex`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
----
.. _degrees: .. _degrees:
degrees(*radians*) degrees(*radians*)
@ -1098,6 +1083,45 @@ echoln(*value*)
---- ----
.. _encode:
encode(*value*, *algorithm*)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Encode the value using the given algorithm
**Parameters**
* **value\*** --- The value to encode
* **algorithm\*** --- One of the following encoding algorithms: base64, hex, uri
**Examples**
To base64-encode 'Hello, World!':
.. code-block:: custsqlite
;SELECT encode('Hello, World!', 'base64')
SGVsbG8sIFdvcmxkIQ==
To hex-encode 'Hello, World!':
.. code-block:: custsqlite
;SELECT encode('Hello, World!', 'hex')
48656c6c6f2c20576f726c6421
To URI-encode 'Hello, World!':
.. code-block:: custsqlite
;SELECT encode('Hello, World!', 'uri')
Hello%2C%20World%21
**See Also**
:ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
----
.. _endswith: .. _endswith:
endswith(*str*, *suffix*) endswith(*str*, *suffix*)
@ -1125,7 +1149,7 @@ endswith(*str*, *suffix*)
0 0
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1180,7 +1204,7 @@ extract(*str*)
{"col_0":1.0,"col_1":2.0} {"col_0":1.0,"col_1":2.0}
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1381,7 +1405,7 @@ group_concat(*X*, *\[sep\]*)
hw,gw hw,gw
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1405,7 +1429,7 @@ group_spooky_hash(*str*)
4e7a190aead058cb123c94290f29c34a 4e7a190aead058cb123c94290f29c34a
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1421,7 +1445,7 @@ gunzip(*b*)
* **b** --- The blob to decompress * **b** --- The blob to decompress
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1437,7 +1461,7 @@ gzip(*value*)
* **value** --- The value to compress * **value** --- The value to compress
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1490,7 +1514,7 @@ humanize_duration(*secs*)
1s500 1s500
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`date`, :ref:`datetime`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`julianday`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`strftime`, :ref:`substr`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`date`, :ref:`datetime`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`julianday`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`strftime`, :ref:`substr`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1514,7 +1538,7 @@ humanize_file_size(*value*)
10.0MB 10.0MB
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1562,7 +1586,7 @@ instr(*haystack*, *needle*)
2 2
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1915,7 +1939,7 @@ leftstr(*str*, *N*)
abc abc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -1939,7 +1963,7 @@ length(*str*)
3 3
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2129,7 +2153,7 @@ logfmt2json(*str*)
{"foo":1,"bar":2,"name":"Rolo Tomassi"} {"foo":1,"bar":2,"name":"Rolo Tomassi"}
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2153,7 +2177,7 @@ lower(*str*)
abc abc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2185,7 +2209,7 @@ ltrim(*str*, *\[chars\]*)
c c
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2342,7 +2366,7 @@ padc(*str*, *len*)
abcdef ghi abcdef ghi
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2374,7 +2398,7 @@ padl(*str*, *len*)
abcdef abcdef
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2406,7 +2430,7 @@ padr(*str*, *len*)
abcdefghi abcdefghi
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2504,7 +2528,7 @@ printf(*format*, *X*)
value: 00011 value: 00011
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2528,7 +2552,7 @@ proper(*str*)
Hello, World! Hello, World!
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2711,7 +2735,7 @@ regexp_capture(*string*, *pattern*)
1 2 3 8 9 2 1 2 3 8 9 2
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2738,7 +2762,7 @@ regexp_capture_into_json(*string*, *pattern*)
1 {"col_0":"b","col_1":2} 1 {"col_0":"b","col_1":2}
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2777,7 +2801,7 @@ regexp_match(*re*, *str*)
{"num":123,"str":"four"} {"num":123,"str":"four"}
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_replace`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_replace`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2810,7 +2834,7 @@ regexp_replace(*str*, *re*, *repl*)
<123> <abc> <123> <abc>
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_match`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_match`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2843,7 +2867,7 @@ replace(*str*, *old*, *replacement*)
zbc zbc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2868,7 +2892,7 @@ replicate(*str*, *N*)
abcabcabc abcabcabc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2892,7 +2916,7 @@ reverse(*str*)
cba cba
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -2924,7 +2948,7 @@ rightstr(*str*, *N*)
abc abc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3020,7 +3044,7 @@ rtrim(*str*, *\[chars\]*)
a a
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3090,7 +3114,7 @@ sparkline(*value*, *\[upper\]*)
▁▂▃▄▅▆▇█ ▁▂▃▄▅▆▇█
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3135,7 +3159,7 @@ spooky_hash(*str*)
f96b3d9c1a19f4394c97a1b79b1880df f96b3d9c1a19f4394c97a1b79b1880df
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3249,7 +3273,7 @@ startswith(*str*, *prefix*)
0 0
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3274,7 +3298,7 @@ strfilter(*source*, *include*)
bcbc bcbc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3361,7 +3385,7 @@ substr(*str*, *start*, *\[size\]*)
b b
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3568,7 +3592,7 @@ trim(*str*, *\[chars\]*)
abc abc
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`unicode`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3621,7 +3645,7 @@ unicode(*X*)
97 97
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`upper`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`upper`, :ref:`xpath`
---- ----
@ -3659,55 +3683,7 @@ upper(*str*)
ABC ABC
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`xpath` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`xpath`
----
.. _uri_decode:
uri_decode(*str*)
^^^^^^^^^^^^^^^^^
Decode the given URI-encoded string
**Parameters**
* **str\*** --- The string to decode
**Examples**
To decode '%63%75%72%6c':
.. code-block:: custsqlite
;SELECT uri_decode('%63%75%72%6c')
curl
**See Also**
:ref:`uri_encode`
----
.. _uri_encode:
uri_encode(*str*)
^^^^^^^^^^^^^^^^^
URI-encode the given string
**Parameters**
* **str\*** --- The string to URI-encode
**Examples**
To encode 'Hello, World!':
.. code-block:: custsqlite
;SELECT uri_encode('Hello, World!')
Hello%2C%20World%21
**See Also**
:ref:`uri_decode`
---- ----
@ -3750,7 +3726,7 @@ xpath(*xpath*, *xmldoc*)
Hello ★ /abc/def/text() {} Hello ★ Hello ★ /abc/def/text() {} Hello ★
**See Also** **See Also**
:ref:`base64_encode`, :ref:`base64_encode`, :ref:`char`, :ref:`charindex`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper` :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`
---- ----

View File

@ -41,10 +41,6 @@
#include "sqlite3.h" #include "sqlite3.h"
#include "vtab_module.hh" #include "vtab_module.hh"
#if defined(HAVE_LIBCURL)
# include <curl/curl.h>
#endif
static std::string static std::string
sql_gethostbyname(const char* name_in) sql_gethostbyname(const char* name_in)
{ {
@ -135,42 +131,6 @@ sql_gethostbyaddr(const char* addr_str)
return buffer; return buffer;
} }
#if defined(HAVE_LIBCURL)
static CURL*
get_curl_easy()
{
static struct curl_wrapper {
curl_wrapper() { this->cw_value = curl_easy_init(); }
auto_mem<CURL> cw_value{curl_easy_cleanup};
} retval;
return retval.cw_value.in();
}
static auto_mem<char>
sql_uri_encode(string_fragment str)
{
auto_mem<char> retval(curl_free);
retval = curl_easy_escape(get_curl_easy(), str.data(), str.length());
return retval;
}
static auto_mem<char>
sql_uri_decode(string_fragment str)
{
auto_mem<char> retval(curl_free);
retval = curl_easy_unescape(
get_curl_easy(), str.data(), str.length(), nullptr);
return retval;
}
#endif
int int
network_extension_functions(struct FuncDef** basic_funcs, network_extension_functions(struct FuncDef** basic_funcs,
struct FuncDefAgg** agg_funcs) struct FuncDefAgg** agg_funcs)
@ -200,28 +160,6 @@ network_extension_functions(struct FuncDef** basic_funcs,
"SELECT gethostbyaddr('127.0.0.1')", "SELECT gethostbyaddr('127.0.0.1')",
})), })),
#if defined(HAVE_LIBCURL)
sqlite_func_adapter<decltype(&sql_uri_encode), sql_uri_encode>::builder(
help_text("uri_encode", "URI-encode the given string")
.sql_function()
.with_parameter({"str", "The string to URI-encode"})
.with_tags({"uri"})
.with_example({
"To encode 'Hello, World!'",
"SELECT uri_encode('Hello, World!')",
})),
sqlite_func_adapter<decltype(&sql_uri_decode), sql_uri_decode>::builder(
help_text("uri_decode", "Decode the given URI-encoded string")
.sql_function()
.with_parameter({"str", "The string to decode"})
.with_tags({"uri"})
.with_example({
"To decode '%63%75%72%6c'",
"SELECT uri_decode('%63%75%72%6c')",
})),
#endif
{nullptr}, {nullptr},
}; };

View File

@ -31,6 +31,7 @@
#include "optional.hpp" #include "optional.hpp"
#include "pcrepp/pcrepp.hh" #include "pcrepp/pcrepp.hh"
#include "safe/safe.h" #include "safe/safe.h"
#include "scn/scn.h"
#include "spookyhash/SpookyV2.h" #include "spookyhash/SpookyV2.h"
#include "sqlite-extension-func.hh" #include "sqlite-extension-func.hh"
#include "vtab_module.hh" #include "vtab_module.hh"
@ -39,6 +40,10 @@
#include "yajlpp/json_op.hh" #include "yajlpp/json_op.hh"
#include "yajlpp/yajlpp.hh" #include "yajlpp/yajlpp.hh"
#if defined(HAVE_LIBCURL)
# include <curl/curl.h>
#endif
using namespace mapbox; using namespace mapbox;
struct cache_entry { struct cache_entry {
@ -446,46 +451,167 @@ sql_gzip(sqlite3_value* val)
return nonstd::nullopt; return nonstd::nullopt;
} }
static nonstd::optional<text_auto_buffer> enum class encode_algo {
sql_base64_encode(sqlite3_value* value) base64,
hex,
uri,
};
template<>
struct from_sqlite<encode_algo> {
inline encode_algo operator()(int argc, sqlite3_value** val, int argi)
{
const char* algo_name = (const char*) sqlite3_value_text(val[argi]);
if (strcasecmp(algo_name, "base64") == 0) {
return encode_algo::base64;
}
if (strcasecmp(algo_name, "hex") == 0) {
return encode_algo::hex;
}
if (strcasecmp(algo_name, "uri") == 0) {
return encode_algo::uri;
}
throw from_sqlite_conversion_error("value of 'base64', 'hex', or 'uri'",
argi);
}
};
#if defined(HAVE_LIBCURL)
static CURL*
get_curl_easy()
{
static struct curl_wrapper {
curl_wrapper() { this->cw_value = curl_easy_init(); }
auto_mem<CURL> cw_value{curl_easy_cleanup};
} retval;
return retval.cw_value.in();
}
#endif
static mapbox::util::variant<text_auto_buffer, auto_mem<char>, null_value_t>
sql_encode(sqlite3_value* value, encode_algo algo)
{ {
switch (sqlite3_value_type(value)) { switch (sqlite3_value_type(value)) {
case SQLITE_NULL: { case SQLITE_NULL: {
return nonstd::nullopt; return null_value_t{};
} }
case SQLITE_BLOB: { case SQLITE_BLOB: {
const auto* blob const auto* blob
= static_cast<const char*>(sqlite3_value_blob(value)); = static_cast<const char*>(sqlite3_value_blob(value));
auto blob_len = sqlite3_value_bytes(value); auto blob_len = sqlite3_value_bytes(value);
auto buf = auto_buffer::alloc((blob_len * 5) / 3);
size_t outlen = buf.capacity();
base64_encode(blob, blob_len, buf.in(), &outlen, 0); switch (algo) {
buf.resize(outlen); case encode_algo::base64: {
return text_auto_buffer{std::move(buf)}; auto buf = auto_buffer::alloc((blob_len * 5) / 3);
auto outlen = buf.capacity();
base64_encode(blob, blob_len, buf.in(), &outlen, 0);
buf.resize(outlen);
return text_auto_buffer{std::move(buf)};
}
case encode_algo::hex: {
auto buf = auto_buffer::alloc(blob_len * 2 + 1);
for (size_t lpc = 0; lpc < blob_len; lpc++) {
fmt::format_to(std::back_inserter(buf),
FMT_STRING("{:x}"),
blob[lpc]);
}
return text_auto_buffer{std::move(buf)};
}
#if defined(HAVE_LIBCURL)
case encode_algo::uri: {
auto_mem<char> retval(curl_free);
retval = curl_easy_escape(get_curl_easy(), blob, blob_len);
return retval;
}
#endif
}
} }
default: { default: {
const auto* text = (const char*) sqlite3_value_text(value); const auto* text = (const char*) sqlite3_value_text(value);
auto text_len = sqlite3_value_bytes(value); auto text_len = sqlite3_value_bytes(value);
auto buf = auto_buffer::alloc((text_len * 5) / 3);
size_t outlen = buf.capacity();
base64_encode(text, text_len, buf.in(), &outlen, 0); switch (algo) {
buf.resize(outlen); case encode_algo::base64: {
return text_auto_buffer{std::move(buf)}; auto buf = auto_buffer::alloc((text_len * 5) / 3);
size_t outlen = buf.capacity();
base64_encode(text, text_len, buf.in(), &outlen, 0);
buf.resize(outlen);
return text_auto_buffer{std::move(buf)};
}
case encode_algo::hex: {
auto buf = auto_buffer::alloc(text_len * 2 + 1);
for (size_t lpc = 0; lpc < text_len; lpc++) {
fmt::format_to(std::back_inserter(buf),
FMT_STRING("{:x}"),
text[lpc]);
}
return text_auto_buffer{std::move(buf)};
}
#if defined(HAVE_LIBCURL)
case encode_algo::uri: {
auto_mem<char> retval(curl_free);
retval = curl_easy_escape(get_curl_easy(), text, text_len);
return retval;
}
#endif
}
} }
} }
} }
static blob_auto_buffer static mapbox::util::variant<blob_auto_buffer, auto_mem<char>>
sql_base64_decode(string_fragment str) sql_decode(string_fragment str, encode_algo algo)
{ {
auto buf = auto_buffer::alloc(str.length()); switch (algo) {
auto outlen = buf.capacity(); case encode_algo::base64: {
base64_decode(str.data(), str.length(), buf.in(), &outlen, 0); auto buf = auto_buffer::alloc(str.length());
buf.resize(outlen); auto outlen = buf.capacity();
base64_decode(str.data(), str.length(), buf.in(), &outlen, 0);
buf.resize(outlen);
return blob_auto_buffer{std::move(buf)}; return blob_auto_buffer{std::move(buf)};
}
case encode_algo::hex: {
auto buf = auto_buffer::alloc(str.length() / 2);
auto sv = str.to_string_view();
while (!sv.empty()) {
int32_t value;
auto scan_res = scn::scan(sv, "{:2x}", value);
if (!scan_res) {
throw sqlite_func_error(
"invalid hex input at: {}",
std::distance(str.begin(), sv.begin()));
}
buf.push_back((char) (value & 0xff));
sv = scan_res.range_as_string_view();
}
return blob_auto_buffer{std::move(buf)};
}
#if defined(HAVE_LIBCURL)
case encode_algo::uri: {
auto_mem<char> retval(curl_free);
retval = curl_easy_unescape(
get_curl_easy(), str.data(), str.length(), nullptr);
return retval;
}
#endif
}
} }
std::string std::string
@ -712,23 +838,39 @@ string_extension_functions(struct FuncDef** basic_funcs,
help_text("value", "The value to compress").one_or_more()) help_text("value", "The value to compress").one_or_more())
.with_tags({"string"})), .with_tags({"string"})),
sqlite_func_adapter<decltype(&sql_base64_encode), sql_base64_encode>:: sqlite_func_adapter<decltype(&sql_encode), sql_encode>::builder(
builder( help_text("encode", "Encode the value using the given algorithm")
help_text("base64_encode", "Base-64 encode the given value") .sql_function()
.sql_function() .with_parameter(help_text("value", "The value to encode"))
.with_parameter(help_text("value", "The value to encode")) .with_parameter(help_text("algorithm",
.with_tags({"string"}) "One of the following encoding "
.with_example({ "algorithms: base64, hex, uri"))
"To encode 'Hello, World!'", .with_tags({"string"})
"SELECT base64_encode('Hello, World!')", .with_example({
})), "To base64-encode 'Hello, World!'",
"SELECT encode('Hello, World!', 'base64')",
})
.with_example({
"To hex-encode 'Hello, World!'",
"SELECT encode('Hello, World!', 'hex')",
})
.with_example({
"To URI-encode 'Hello, World!'",
"SELECT encode('Hello, World!', 'uri')",
})),
sqlite_func_adapter<decltype(&sql_base64_decode), sql_base64_decode>:: sqlite_func_adapter<decltype(&sql_decode), sql_decode>::builder(
builder( help_text("decode", "Decode the value using the given algorithm")
help_text("base64_encode", "Base-64 decode the given value") .sql_function()
.sql_function() .with_parameter(help_text("value", "The value to decode"))
.with_parameter(help_text("value", "The value to decode")) .with_parameter(help_text("algorithm",
.with_tags({"string"})), "One of the following encoding "
"algorithms: base64, hex, uri"))
.with_tags({"string"})
.with_example({
"To decode the URI-encoded string '%63%75%72%6c'",
"SELECT decode('%63%75%72%6c', 'uri')",
})),
{nullptr}, {nullptr},
}; };

View File

@ -45,6 +45,7 @@
#include "help_text_formatter.hh" #include "help_text_formatter.hh"
#include "mapbox/variant.hpp" #include "mapbox/variant.hpp"
#include "optional.hpp" #include "optional.hpp"
#include "shlex.resolver.hh"
#include "sqlite-extension-func.hh" #include "sqlite-extension-func.hh"
extern const char* LNAV_SQLITE_ERROR_PREFIX; extern const char* LNAV_SQLITE_ERROR_PREFIX;
@ -224,6 +225,12 @@ struct from_sqlite<vtab_types::nullable<T>> {
void to_sqlite(sqlite3_context* ctx, const lnav::console::user_message& um); void to_sqlite(sqlite3_context* ctx, const lnav::console::user_message& um);
inline void
to_sqlite(sqlite3_context* ctx, null_value_t)
{
sqlite3_result_null(ctx);
}
inline void inline void
to_sqlite(sqlite3_context* ctx, const char* str) to_sqlite(sqlite3_context* ctx, const char* str)
{ {
@ -409,7 +416,7 @@ struct sqlite_func_adapter<Return (*)(Args...), f> {
to_sqlite(context, std::move(retval)); to_sqlite(context, std::move(retval));
} catch (from_sqlite_conversion_error& e) { } catch (from_sqlite_conversion_error& e) {
char buffer[64]; char buffer[256];
snprintf(buffer, snprintf(buffer,
sizeof(buffer), sizeof(buffer),

View File

@ -786,10 +786,14 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_7f751009d0db15fc97f9113c5c84db05ff1de9c3.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_7f751009d0db15fc97f9113c5c84db05ff1de9c3.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_836e3f721a0f945ad27e7aa241121ba739aab618.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_836e3f721a0f945ad27e7aa241121ba739aab618.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_838e9bc7873b2b238157ba0358e0dfd6a01d837d.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_838e9bc7873b2b238157ba0358e0dfd6a01d837d.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_838e9bc7873b2b238157ba0358e0dfd6a01d837d.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_838e9bc7873b2b238157ba0358e0dfd6a01d837d.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_84e77dedec887c5e2433dbc5b130000cd88963bd.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_84e77dedec887c5e2433dbc5b130000cd88963bd.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_84e77dedec887c5e2433dbc5b130000cd88963bd.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_84e77dedec887c5e2433dbc5b130000cd88963bd.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_887afe94962d958aca2e03f7873d58ca93e190b5.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_887afe94962d958aca2e03f7873d58ca93e190b5.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_8c9ef83431ea75050fd16824075bf72056cf5f53.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_8c9ef83431ea75050fd16824075bf72056cf5f53.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_8c9ef83431ea75050fd16824075bf72056cf5f53.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_8c9ef83431ea75050fd16824075bf72056cf5f53.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_8cef54f0617960320b5d3615068eb27333dcf6a3.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_8cef54f0617960320b5d3615068eb27333dcf6a3.err \
@ -812,6 +816,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_bfe8b09e23389af0ef14359b66d68228d0285185.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_bfe8b09e23389af0ef14359b66d68228d0285185.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_cc53348c585ee71a7456157ad6b125689813bafe.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_cc53348c585ee71a7456157ad6b125689813bafe.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_ce9db1dbc2e5fee87247135d17787ff3af014d77.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_ce9db1dbc2e5fee87247135d17787ff3af014d77.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_ce9db1dbc2e5fee87247135d17787ff3af014d77.out \ $(srcdir)/%reldir%/test_sql_str_func.sh_ce9db1dbc2e5fee87247135d17787ff3af014d77.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_d3367527118052081a541a660b091f6f495b1c0d.err \ $(srcdir)/%reldir%/test_sql_str_func.sh_d3367527118052081a541a660b091f6f495b1c0d.err \

View File

@ -1949,21 +1949,6 @@ lnav@googlegroups.com[1] support@lnav.org[2]
base64_encode(value)
══════════════════════════════════════════════════════════════════════
Base-64 decode the given value
Parameter
value The value to decode
See Also
base64_encode(), char(), charindex(), endswith(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
strfilter(), substr(), trim(), unicode(), upper(), xpath()
basename(path) basename(path)
══════════════════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════════════════
Extract the base portion of a pathname. Extract the base portion of a pathname.
@ -2025,14 +2010,14 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
X The unicode code point values X The unicode code point values
See Also See Also
base64_encode(), base64_encode(), charindex(), endswith(), extract(), charindex(), decode(), encode(), endswith(), extract(), group_concat(),
group_concat(), group_spooky_hash(), gunzip(), gzip(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(), regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(), rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
strfilter(), substr(), trim(), unicode(), upper(), xpath() substr(), trim(), unicode(), upper(), xpath()
Example Example
#1 To get a string with the code points 0x48 and 0x49: #1 To get a string with the code points 0x48 and 0x49:
;SELECT char(0x48, 0x49)  ;SELECT char(0x48, 0x49) 
@ -2050,14 +2035,14 @@ lnav@googlegroups.com[1] support@lnav.org[2]
start The one-based index within the haystack to start The one-based index within the haystack to
start the search start the search
See Also See Also
base64_encode(), base64_encode(), char(), endswith(), extract(), char(), decode(), encode(), endswith(), extract(), group_concat(),
group_concat(), group_spooky_hash(), gunzip(), gzip(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(), regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(), rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
strfilter(), substr(), trim(), unicode(), upper(), xpath() substr(), trim(), unicode(), upper(), xpath()
Examples Examples
#1 To search for the string 'abc' within 'abcabc' and starting at position 2: #1 To search for the string 'abc' within 'abcabc' and starting at position 2:
;SELECT charindex('abc', 'abcabc', 2)  ;SELECT charindex('abc', 'abcabc', 2) 
@ -2155,6 +2140,28 @@ lnav@googlegroups.com[1] support@lnav.org[2]
decode(value, algorithm)
══════════════════════════════════════════════════════════════════════
Decode the value using the given algorithm
Parameters
value The value to decode
algorithm One of the following encoding algorithms:
base64, hex, uri
See Also
char(), charindex(), encode(), endswith(), extract(), group_concat(),
group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
substr(), trim(), unicode(), upper(), xpath()
Example
#1 To decode the URI-encoded string '%63%75%72%6c':
;SELECT decode('%63%75%72%6c', 'uri') 
degrees(radians) degrees(radians)
══════════════════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════════════════
Converts radians to degrees Converts radians to degrees
@ -2218,6 +2225,36 @@ lnav@googlegroups.com[1] support@lnav.org[2]
:write-raw-to, :write-screen-to, :write-table-to, :write-to, :write-raw-to, :write-screen-to, :write-table-to, :write-to,
:write-view-to :write-view-to
encode(value, algorithm)
══════════════════════════════════════════════════════════════════════
Encode the value using the given algorithm
Parameters
value The value to encode
algorithm One of the following encoding algorithms:
base64, hex, uri
See Also
char(), charindex(), decode(), endswith(), extract(), group_concat(),
group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
substr(), trim(), unicode(), upper(), xpath()
Examples
#1 To base64-encode 'Hello, World!':
;SELECT encode('Hello, World!', 'base64') 
#2 To hex-encode 'Hello, World!':
;SELECT encode('Hello, World!', 'hex') 
#3 To URI-encode 'Hello, World!':
;SELECT encode('Hello, World!', 'uri') 
endswith(str, suffix) endswith(str, suffix)
══════════════════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════════════════
Test if a string ends with the given suffix Test if a string ends with the given suffix
@ -2225,14 +2262,14 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to test str The string to test
suffix The suffix to check in the string suffix The suffix to check in the string
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), extract(), char(), charindex(), decode(), encode(), extract(), group_concat(),
group_concat(), group_spooky_hash(), gunzip(), gzip(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(), regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(), rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
strfilter(), substr(), trim(), unicode(), upper(), xpath() substr(), trim(), unicode(), upper(), xpath()
Examples Examples
#1 To test if the string 'notbad.jpg' ends with '.jpg': #1 To test if the string 'notbad.jpg' ends with '.jpg':
;SELECT endswith('notbad.jpg', '.jpg')  ;SELECT endswith('notbad.jpg', '.jpg') 
@ -2265,14 +2302,14 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to parse str The string to parse
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), group_concat(),
group_concat(), group_spooky_hash(), gunzip(), gzip(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(), regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(), rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
strfilter(), substr(), trim(), unicode(), upper(), xpath() substr(), trim(), unicode(), upper(), xpath()
Examples Examples
#1 To extract key/value pairs from a string: #1 To extract key/value pairs from a string:
;SELECT extract('foo=1 bar=2 name="Rolo Tomassi"')  ;SELECT extract('foo=1 bar=2 name="Rolo Tomassi"') 
@ -2380,8 +2417,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
X The value to concatenate. X The value to concatenate.
sep The separator to place between the values. sep The separator to place between the values.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
humanize_file_size(), instr(), leftstr(), length(), logfmt2json(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
lower(), ltrim(), padc(), padl(), padr(), printf(), proper(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
regexp_capture(), regexp_capture_into_json(), regexp_match(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2410,8 +2447,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to hash str The string to hash
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), gunzip(), gzip(), humanize_duration(), group_concat(), gunzip(), gzip(), humanize_duration(),
humanize_file_size(), instr(), leftstr(), length(), logfmt2json(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
lower(), ltrim(), padc(), padl(), padr(), printf(), proper(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
regexp_capture(), regexp_capture_into_json(), regexp_match(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2430,14 +2467,14 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
b The blob to decompress b The blob to decompress
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gzip(), group_concat(), group_spooky_hash(), gzip(), humanize_duration(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(), regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(), rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
strfilter(), substr(), trim(), unicode(), upper(), xpath() substr(), trim(), unicode(), upper(), xpath()
gzip(value, ...) gzip(value, ...)
══════════════════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════════════════
@ -2445,14 +2482,14 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
value The value to compress value The value to compress
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), group_concat(), group_spooky_hash(), gunzip(), humanize_duration(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(), regexp_replace(), replace(), replicate(), reverse(), rightstr(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(), rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
strfilter(), substr(), trim(), unicode(), upper(), xpath() substr(), trim(), unicode(), upper(), xpath()
hex(X) hex(X)
══════════════════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════════════════
@ -2473,15 +2510,15 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
secs The duration in seconds secs The duration in seconds
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), date(), char(), charindex(), date(), datetime(), decode(), encode(),
datetime(), endswith(), extract(), group_concat(), group_spooky_hash(), endswith(), extract(), group_concat(), group_spooky_hash(), gunzip(),
gunzip(), gzip(), humanize_file_size(), instr(), julianday(), gzip(), humanize_file_size(), instr(), julianday(), leftstr(),
leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
padr(), printf(), proper(), regexp_capture(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
regexp_capture_into_json(), regexp_match(), regexp_replace(), regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(), rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
spooky_hash(), startswith(), strfilter(), strftime(), substr(), time(), strfilter(), strftime(), substr(), time(), timediff(), timeslice(),
timediff(), timeslice(), trim(), unicode(), upper(), xpath() trim(), unicode(), upper(), xpath()
Examples Examples
#1 To format a duration: #1 To format a duration:
;SELECT humanize_duration(15 * 60)  ;SELECT humanize_duration(15 * 60) 
@ -2498,8 +2535,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
value The file size to format value The file size to format
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), instr(), leftstr(), length(), logfmt2json(), humanize_duration(), instr(), leftstr(), length(), logfmt2json(),
lower(), ltrim(), padc(), padl(), padr(), printf(), proper(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
regexp_capture(), regexp_capture_into_json(), regexp_match(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2535,8 +2572,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
haystack The string to search within haystack The string to search within
needle The string to look for in the haystack needle The string to look for in the haystack
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), leftstr(), length(), humanize_duration(), humanize_file_size(), leftstr(), length(),
logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), printf(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2756,8 +2793,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
N The number of characters from the left side of the N The number of characters from the left side of the
string to return. string to return.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), length(), humanize_duration(), humanize_file_size(), instr(), length(),
logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), printf(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2781,8 +2818,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to determine the length of str The string to determine the length of
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), printf(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2901,8 +2938,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The logfmt message to parse str The logfmt message to parse
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(), length(), lower(), ltrim(), padc(), padl(), padr(), printf(), proper(),
regexp_capture(), regexp_capture_into_json(), regexp_match(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2922,8 +2959,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to convert. str The string to convert.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), ltrim(), padc(), padl(), padr(), printf(), length(), logfmt2json(), ltrim(), padc(), padl(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -2944,8 +2981,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to trim characters from the left side str The string to trim characters from the left side
chars The characters to trim. Defaults to spaces. chars The characters to trim. Defaults to spaces.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), padc(), padl(), padr(), printf(), length(), logfmt2json(), lower(), padc(), padl(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -3052,8 +3089,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to pad str The string to pad
len The minimum desired length of the output string len The minimum desired length of the output string
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padl(), padr(), printf(), length(), logfmt2json(), lower(), ltrim(), padl(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -3078,8 +3115,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to pad str The string to pad
len The minimum desired length of the output string len The minimum desired length of the output string
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padr(), printf(), length(), logfmt2json(), lower(), ltrim(), padc(), padr(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -3104,8 +3141,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to pad str The string to pad
len The minimum desired length of the output string len The minimum desired length of the output string
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), printf(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), printf(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -3170,8 +3207,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
X The argument to substitute at a given position in X The argument to substitute at a given position in
the format. the format.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(), proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -3198,8 +3235,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to capitalize. str The string to capitalize.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), regexp_capture(), regexp_capture_into_json(), regexp_match(), printf(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
@ -3321,8 +3358,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
string. string.
content The captured value from the string. content The captured value from the string.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture_into_json(), regexp_match(), printf(), proper(), regexp_capture_into_json(), regexp_match(),
@ -3350,8 +3387,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
string. string.
content The captured values from the string. content The captured values from the string.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_match(), regexp_replace(), printf(), proper(), regexp_capture(), regexp_match(), regexp_replace(),
@ -3372,8 +3409,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
re The regular expression to use re The regular expression to use
str The string to test against the regular expression str The string to test against the regular expression
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3406,8 +3443,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
groups with a backslash followed by the number of the group, groups with a backslash followed by the number of the group,
starting with 1. starting with 1.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3434,8 +3471,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
replacement The string to replace any occurrences of replacement The string to replace any occurrences of
the old string with. the old string with.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3459,8 +3496,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to replicate. str The string to replicate.
N The number of times to replicate the string. N The number of times to replicate the string.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3479,8 +3516,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to reverse. str The string to reverse.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3501,8 +3538,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
N The number of characters from the right side of the N The number of characters from the right side of the
string to return. string to return.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3568,8 +3605,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to trim characters from the right side str The string to trim characters from the right side
chars The characters to trim. Defaults to spaces. chars The characters to trim. Defaults to spaces.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3622,8 +3659,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
non-aggregate version defaults to 100. The aggregate non-aggregate version defaults to 100. The aggregate
version uses the largest value in the inputs. version uses the largest value in the inputs.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3646,8 +3683,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to hash str The string to hash
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3727,8 +3764,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
str The string to test str The string to test
prefix The prefix to check in the string prefix The prefix to check in the string
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3753,8 +3790,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
source The string to filter source The string to filter
include The characters to include in the result include The characters to include in the result
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3810,8 +3847,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
the value is negative, then the characters before the start the value is negative, then the characters before the start
are returned. are returned.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -3959,8 +3996,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
right sides. right sides.
chars The characters to trim. Defaults to spaces. chars The characters to trim. Defaults to spaces.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -4001,8 +4038,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
X The string to examine. X The string to examine.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -4029,8 +4066,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
Parameter Parameter
str The string to convert. str The string to convert.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),
@ -4043,32 +4080,6 @@ lnav@googlegroups.com[1] support@lnav.org[2]
uri_decode(str)
══════════════════════════════════════════════════════════════════════
Decode the given URI-encoded string
Parameter
str The string to decode
See Also
uri_encode()
Example
#1 To decode '%63%75%72%6c':
;SELECT uri_decode('%63%75%72%6c') 
uri_encode(str)
══════════════════════════════════════════════════════════════════════
URI-encode the given string
Parameter
str The string to URI-encode
See Also
uri_decode()
Example
#1 To encode 'Hello, World!':
;SELECT uri_encode('Hello, World!') 
xpath(xpath, xmldoc) xpath(xpath, xmldoc)
══════════════════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════════════════
A table-valued function that executes an xpath expression over an A table-valued function that executes an xpath expression over an
@ -4084,8 +4095,8 @@ lnav@googlegroups.com[1] support@lnav.org[2]
node_attr The node's attributes stored in JSON object. node_attr The node's attributes stored in JSON object.
node_text The node's text value. node_text The node's text value.
See Also See Also
base64_encode(), base64_encode(), char(), charindex(), endswith(), char(), charindex(), decode(), encode(), endswith(), extract(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
humanize_duration(), humanize_file_size(), instr(), leftstr(), humanize_duration(), humanize_file_size(), instr(), leftstr(),
length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
printf(), proper(), regexp_capture(), regexp_capture_into_json(), printf(), proper(), regexp_capture(), regexp_capture_into_json(),

View File

@ -0,0 +1,2 @@
Row 0:
Column encode('foo', null): (null)

View File

@ -0,0 +1 @@
error: sqlite3_exec failed -- Expecting an value of 'base64', 'hex', or 'uri' for argument number 1

View File

@ -0,0 +1,2 @@
Row 0:
Column encode(null, 'base64'): (null)

View File

@ -99,3 +99,9 @@ run_cap_test ./drive_sql "SELECT * FROM regexp_capture('1 2 3 45', '(\d+)')"
run_cap_test ./drive_sql "SELECT * FROM regexp_capture('foo foo', '^foo')" run_cap_test ./drive_sql "SELECT * FROM regexp_capture('foo foo', '^foo')"
run_cap_test ./drive_sql "SELECT * FROM regexp_capture_into_json('foo=1 bar=2; foo=3 bar=4', 'foo=(\d+) bar=(\d+)')" run_cap_test ./drive_sql "SELECT * FROM regexp_capture_into_json('foo=1 bar=2; foo=3 bar=4', 'foo=(\d+) bar=(\d+)')"
run_cap_test ./drive_sql "SELECT encode('foo', 'bar')"
run_cap_test ./drive_sql "SELECT encode('foo', null)"
run_cap_test ./drive_sql "SELECT encode(null, 'base64')"