From e66b5907f6e627427127ae32656404e939e7dd58 Mon Sep 17 00:00:00 2001 From: Willi Goesgens Date: Wed, 12 Aug 2015 11:11:30 +0200 Subject: [PATCH] Add examples to database basics --- arangod/V8Server/v8-vocbase.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arangod/V8Server/v8-vocbase.cpp b/arangod/V8Server/v8-vocbase.cpp index b62f2c457a..054403130b 100644 --- a/arangod/V8Server/v8-vocbase.cpp +++ b/arangod/V8Server/v8-vocbase.cpp @@ -2864,6 +2864,12 @@ static void MapGetVocBase (v8::Local const name, /// /// Returns the server version string. Note that this is not the version of the /// database. +/// +/// @EXAMPLES +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{dbVersion} +/// require("internal").db._version(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT /// @endDocuBlock //////////////////////////////////////////////////////////////////////////////// @@ -2880,6 +2886,12 @@ static void JS_VersionServer (const v8::FunctionCallbackInfo& args) { /// `db._path()` /// /// Returns the filesystem path of the current database as a string. +/// +/// @EXAMPLES +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{dbPath} +/// require("internal").db._path(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT /// @endDocuBlock //////////////////////////////////////////////////////////////////////////////// @@ -2902,6 +2914,12 @@ static void JS_PathDatabase (const v8::FunctionCallbackInfo& args) { /// `db._id()` /// /// Returns the id of the current database as a string. +/// +/// @EXAMPLES +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{dbId} +/// require("internal").db._id(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT /// @endDocuBlock //////////////////////////////////////////////////////////////////////////////// @@ -2924,6 +2942,12 @@ static void JS_IdDatabase (const v8::FunctionCallbackInfo& args) { /// `db._name()` /// /// Returns the name of the current database as a string. +/// +/// @EXAMPLES +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{dbName} +/// require("internal").db._name(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT /// @endDocuBlock ////////////////////////////////////////////////////////////////////////////////