From aad93e39faf9c03447ec99f4fa1abd56b6586943 Mon Sep 17 00:00:00 2001 From: Obinna Ekwuno Date: Thu, 8 Aug 2024 15:39:57 +0100 Subject: [PATCH] DOC 231: Update function descriptions for `session::x` (#752) --- .../surrealql/functions/database/session.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc-surrealdb_versioned_docs/version-latest/surrealql/functions/database/session.mdx b/doc-surrealdb_versioned_docs/version-latest/surrealql/functions/database/session.mdx index 94d194343..74c960792 100644 --- a/doc-surrealdb_versioned_docs/version-latest/surrealql/functions/database/session.mdx +++ b/doc-surrealdb_versioned_docs/version-latest/surrealql/functions/database/session.mdx @@ -63,24 +63,24 @@ RETURN session::db(); ## `session::id` -The `session::db` function returns the currently selected database. +The `session::id` function returns the current user's session ID. ```surql title="API DEFINITION" -session::db() -> string +session::id() -> string ``` The following example shows this function, and its output, when used in a [`RETURN`](/docs/surrealdb/surrealql/statements/return) statement: ```surql -RETURN session::db(); +RETURN session::id(); -"my_db" +"I895rKuixHwCNIduyBIYH2M0Pga7oUmWnng5exEE4a7EB942GVElGrnRhE5scF5d" ```
## `session::ip` -The `session::ip` function returns the currently selected database. +The `session::ip` function returns the current user's session IP address. ```surql title="API DEFINITION" session::ip() -> string @@ -131,15 +131,15 @@ RETURN session::origin(); ## `session::ac` -The `session::ac` function returns the current user's access method. +The `session::ac` function replaces the `session::sc` function and returns the current user's access method. ```surql title="API DEFINITION" -session::sc() -> string +session::ac() -> string ``` The following example shows this function, and its output, when used in a [`RETURN`](/docs/surrealdb/surrealql/statements/return) statement: ```surql -RETURN session::sc(); +RETURN session::ac(); "user" ```