mirror of https://gitee.com/bigwinds/arangodb
187 lines
6.4 KiB
Plaintext
187 lines
6.4 KiB
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief arango shell
|
|
///
|
|
/// @file
|
|
///
|
|
/// DISCLAIMER
|
|
///
|
|
/// Copyright 2012 triagens GmbH, Cologne, Germany
|
|
///
|
|
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|
/// you may not use this file except in compliance with the License.
|
|
/// You may obtain a copy of the License at
|
|
///
|
|
/// http://www.apache.org/licenses/LICENSE-2.0
|
|
///
|
|
/// Unless required by applicable law or agreed to in writing, software
|
|
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
/// See the License for the specific language governing permissions and
|
|
/// limitations under the License.
|
|
///
|
|
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
|
///
|
|
/// @author Dr. Frank Celler
|
|
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// --SECTION-- HANDLING DOCUMENTS
|
|
// -----------------------------------------------------------------------------
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page ShellDocumentTOC
|
|
///
|
|
/// <ul>
|
|
/// <li>@ref ShellDocument
|
|
/// <ul>
|
|
/// <li>@ref ShellDocumentIntro</li>
|
|
/// <li>@ref ShellDocumentResource</li>
|
|
/// <li>@ref ShellDocumentShell
|
|
/// @copydetails ShellDocumentCallsTOC
|
|
/// </li>
|
|
/// </ul>
|
|
/// </li>
|
|
/// </ul>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page ShellDocumentCallsTOC
|
|
///
|
|
/// <ul>
|
|
/// <li>@ref ShellDocumentCollectionMethods
|
|
/// <ul>
|
|
/// <li>@ref ShellDocumentRead "collection.document"</li>
|
|
/// <li>@ref ShellDocumentCreate "collection.save"</li>
|
|
/// <li>@ref ShellDocumentReplace "collection.replace"</li>
|
|
/// <li>@ref ShellDocumentUpdate "collection.update"</li>
|
|
/// <li>@ref ShellDocumentDelete "collection.remove"</li>
|
|
/// </ul>
|
|
/// </li>
|
|
/// <li>@ref ShellDocumentDatabaseMethods
|
|
/// <ul>
|
|
/// <li>@ref ShellDocumentDbRead "db._document"</li>
|
|
/// <li>@ref ShellDocumentDbReplace "db._replace"</li>
|
|
/// <li>@ref ShellDocumentDbUpdate "db._update"</li>
|
|
/// <li>@ref ShellDocumentDbDelete "db._remove"</li>
|
|
/// </ul>
|
|
/// </li>
|
|
/// </ul>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page ShellDocument Handling Documents
|
|
///
|
|
/// @NAVIGATE_ShellDocument
|
|
///
|
|
/// This is an introduction to ArangoDB's interface for documents and how handle
|
|
/// documents from the JavaScript shell @LIT{arangosh}. For other languages see
|
|
/// the corresponding language API.
|
|
///
|
|
/// @EMBEDTOC{ShellDocumentTOC}
|
|
///
|
|
/// @section ShellDocumentIntro Documents, Identifiers, Handles
|
|
///////////////////////////////////////////////////////////////
|
|
///
|
|
/// @copydoc GlossaryDocument
|
|
///
|
|
/// For example:
|
|
///
|
|
/// @verbinclude document1
|
|
///
|
|
/// All documents contain special attributes: the document handle in @LIT{_id},
|
|
/// the document's unique key in @LIT{_key} and and the etag aka document
|
|
/// revision in @LIT{_rev}. The value of the @LIT{_key} attribute can be
|
|
/// specified by the user when creating a document.
|
|
/// @LIT{_id} and @LIT{_key} values are immutable once the document has been
|
|
/// created. The @LIT{_rev} value is maintained by ArangoDB autonomously.
|
|
///
|
|
/// @copydoc GlossaryDocumentHandle
|
|
///
|
|
/// @copydoc GlossaryDocumentKey
|
|
///
|
|
/// @copydoc GlossaryDocumentRevision
|
|
///
|
|
/// @copydoc GlossaryDocumentEtag
|
|
///
|
|
/// @section ShellDocumentResource Address and ETag of an Document
|
|
//////////////////////////////////////////////////////////////////
|
|
///
|
|
/// All documents in ArangoDB have a document handle. This handle uniquely
|
|
/// defines a document and is managed by ArangoDB. The interface allows
|
|
/// you to access the documents of a collection as:
|
|
///
|
|
/// @LIT{db.@FA{collection}.documet(@FA{document-handle})}
|
|
///
|
|
/// For example: Assume that the document handle, which is stored in
|
|
/// the @LIT{_id} attribute of the document, is @LIT{demo/362549736}
|
|
/// and the document lives in a collection named @FA{demo}, then
|
|
/// that document can be accessed as:
|
|
///
|
|
/// @LIT{db.demo.document("demo/362549736")}
|
|
///
|
|
/// Because the document handle is unique within the database, you
|
|
/// can leave out the @FA{collection} and use the shortcut:
|
|
///
|
|
/// @LIT{db._document("demo/362549736")}
|
|
///
|
|
/// Each document also has a document revision or etag with is returned
|
|
/// in the @LIT{_rev} attribute when requesting a document. The document's
|
|
/// key is returned in the @LIT{_key} attribute.
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @section ShellDocumentShell Working with Documents
|
|
//////////////////////////////////////////////////////
|
|
///
|
|
/// @subsection ShellDocumentCollectionMethods Collection Methods
|
|
/////////////////////////////////////////////////////////////////
|
|
///
|
|
/// @anchor ShellDocumentRead
|
|
/// @copydetails JS_DocumentVocbaseCol
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentCreate
|
|
/// @copydetails JS_SaveVocbaseCol
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentReplace
|
|
/// @copydetails JS_ReplaceVocbaseCol
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentUpdate
|
|
/// @copydetails JS_UpdateVocbaseCol
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentDelete
|
|
/// @copydetails JS_RemoveVocbaseCol
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @subsection ShellDocumentDatabaseMethods Database Methods
|
|
/////////////////////////////////////////////////////////////
|
|
///
|
|
/// @anchor ShellDocumentDbRead
|
|
/// @copydetails JS_DocumentVocbase
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentDbReplace
|
|
/// @copydetails JS_ReplaceVocbase
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentDbUpdate
|
|
/// @copydetails JS_UpdateVocbase
|
|
///
|
|
/// @CLEARPAGE
|
|
/// @anchor ShellDocumentDbDelete
|
|
/// @copydetails JS_RemoveVocbase
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// --SECTION-- END-OF-FILE
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Local Variables:
|
|
// mode: c++
|
|
// mode: outline-minor
|
|
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
|
|
// End:
|