mirror of https://gitee.com/bigwinds/arangodb
104 lines
3.6 KiB
Plaintext
104 lines
3.6 KiB
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief user guide guide
|
|
///
|
|
/// @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
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page FirstStepsArangoDBTOC
|
|
///
|
|
/// <ul>
|
|
/// <li>@ref FirstStepsArangoDB
|
|
/// <ul>
|
|
/// <li>@ref FirstStepsArangoDBFirstSteps</li>
|
|
/// </ul>
|
|
/// </li>
|
|
/// </ul>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page FirstStepsArangoDB First Steps with ArangoDB
|
|
///
|
|
/// @EMBEDTOC{FirstStepsArangoDBTOC}
|
|
///
|
|
/// @section FirstStepsArangoDBFirstSteps First Steps using arangosh
|
|
////////////////////////////////////////////////////////////////////
|
|
///
|
|
/// Create an empty directory, which will hold the database:
|
|
///
|
|
/// @LIT{> mkdir /tmp/vocbase}
|
|
///
|
|
/// First start the ArgangoDB server. You can start it as daemon and
|
|
/// redirect the output to a file as follows:
|
|
///
|
|
/// @LIT{> ./arangod --daemon --pid-file /tmp/arangod.pid --log.file /tmp/arangod.log /tmp/vocbase}
|
|
///
|
|
/// This will start the ArangoDB server process, store its process
|
|
/// identifier in the file @LIT{/tmp/arangod.pid} and write the output
|
|
/// to @LIT{/tmp/arangod.log}. The database files will live in
|
|
/// @LIT{/tmp/vocbase}.
|
|
///
|
|
/// Start the ArangoDB JavaScript shell.
|
|
///
|
|
/// @TINYEXAMPLE{arangosh-start,starting the shell}
|
|
///
|
|
/// This gives you a prompt, where you can issue JavaScript commands.
|
|
/// All documents are stored in collections. All collections are stored in a
|
|
/// database.
|
|
///
|
|
/// @verbinclude arangosh-db
|
|
///
|
|
/// Creating a collection is simple. You can use the @FN{_create} method
|
|
/// of the @LIT{db} variable.
|
|
///
|
|
/// @verbinclude arangosh-create-collection
|
|
///
|
|
/// After the collection has been create you can easily access it using the path
|
|
/// @LIT{db.example}. The collection currently shows as @LIT{loaded}, meaning
|
|
/// that its loaded into memory. If you restart the server and access the
|
|
/// collection again, it will now show as @LIT{unloaded}. You can also manually
|
|
/// unload a collection
|
|
///
|
|
/// @verbinclude arangosh-unload-collection
|
|
///
|
|
/// In order to create new documents in a collection, use the @FN{save}
|
|
/// operator. If the collection is currently unloaded, it will automatically be
|
|
/// loaded into memory.
|
|
///
|
|
/// @verbinclude arangosh-save-documents
|
|
///
|
|
/// In order to select all elements of a collection, one can use the @FN{all}
|
|
/// operator.
|
|
///
|
|
/// @verbinclude arangosh-all-documents
|
|
///
|
|
/// This will select and print all documents.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Local Variables:
|
|
// mode: c++
|
|
// mode: outline-minor
|
|
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
|
|
// End:
|