Andrei Stefan 4eea9c20ee SQL: document the use of a filter on _routing (#52355)
* Fix "Description"s for various sections in the functions pages.
* Added a TIP for searching using a routing key.
* Other small polishings

(cherry picked from commit 9fad0b1ac4409a42c435ed040f41cbaea18930a3)
2020-02-14 19:00:26 +02:00

49 lines
1.3 KiB
Plaintext

[role="xpack"]
[testenv="basic"]
[[sql-functions-system]]
=== System Functions
These functions return metadata type of information about the system being queried.
[[sql-functions-system-database]]
==== `DATABASE`
.Synopsis:
[source, sql]
--------------------------------------------------
DATABASE()
--------------------------------------------------
*Input*: _none_
*Output*: string
*Description*: Returns the name of the database being queried. In the case of Elasticsearch SQL, this
is the name of the Elasticsearch cluster. This function should always return a non-null
value.
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs/docs.csv-spec[database]
--------------------------------------------------
[[sql-functions-system-user]]
==== `USER`
.Synopsis:
[source, sql]
--------------------------------------------------
USER()
--------------------------------------------------
*Input*: _none_
*Output*: string
*Description*: Returns the username of the authenticated user executing the query. This function can
return `null` in case <<elasticsearch-security,security>> is disabled.
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs/docs.csv-spec[user]
--------------------------------------------------