1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into devel

This commit is contained in:
Jan Steemann 2015-08-19 11:19:46 +02:00
commit 2c640965b8
6 changed files with 47 additions and 8 deletions

16
.gitignore vendored
View File

@ -53,6 +53,22 @@ core
TAGS
tags
CMakeCache.txt
CMakeFiles/
CPackConfig.cmake
CPackSourceConfig.cmake
CTestTestfile.cmake
UnitTests/CMakeFiles/
UnitTests/CTestTestfile.cmake
UnitTests/cmake_install.cmake
arangod/CMakeFiles/
arangod/cmake_install.cmake
arangosh/CMakeFiles/
arangosh/cmake_install.cmake
cmake_install.cmake
lib/CMakeFiles/
lib/cmake_install.cmake
Documentation/Examples/*.generated
Documentation/Books/Users/book.json
Documentation/Books/Users/manual.epub

View File

@ -13,6 +13,9 @@ The values of *_from* and *_to* are immutable once saved.
are connection documents that reference other documents. The type of a collection
must be specified when a collection is created and cannot be changed afterwards.
To change edge endpoints you would need to remove old document/edge and insert new one.
Other fields can be updated as in default collection.
!SECTION Working with Edges
!SUBSECTION Insert

View File

@ -1,8 +1,19 @@
arangosh> db.example.save({ Hello : "world" });
arangosh> db.example.save({ Hello : "world", foo : "bar" });
{
"_id" : "example/450753419",
"_rev" : "450753419",
"_key" : "450753419"
"_id" : "example/450817260",
"_rev" : "450817260",
"_key" : "450817260"
}
arangosh> db.example.updateByExample({ Hello: "world" }, { Hello: "foo", World: "bar" }, false);
1
arangosh> db.example.byExample({ Hello: "foo" }).toArray()
[
{
"_id" : "example/450817260",
"_key" : "450817260",
"_rev" : "451144940",
"Hello" : "foo",
"foo" : "bar",
"World" : "bar"
}
]

View File

@ -2963,8 +2963,8 @@ static string GetId (const v8::FunctionCallbackInfo<v8::Value>& args, int which)
/// @EXAMPLES
///
/// @EXAMPLE_ARANGOSH_OUTPUT{EDGCOL_01_SaveEdgeCol}
/// ~ db._create("vertex");
/// ~ db._createEdgeCollection("relation");
/// db._create("vertex");
/// db._createEdgeCollection("relation");
/// v1 = db.vertex.insert({ name : "vertex 1" });
/// v2 = db.vertex.insert({ name : "vertex 2" });
/// e1 = db.relation.insert(v1, v2, { label : "knows" });

View File

@ -3358,8 +3358,13 @@ static void CreateDatabaseCoordinator (const v8::FunctionCallbackInfo<v8::Value>
/// require("org/arangodb/users").update(username, password, true);
/// require("org/arangodb/users").remove(username);
/// ```
/// Alternatively, you can specify user data directly. For example:
///
/// This method can only be used from within the *_system* database.
/// ```js
/// db._createDatabase("newDB", [], [{ username: "newUser", passwd: "123456", active: true}])
/// ```
///
/// Those methods can only be used from within the *_system* database.
/// @endDocuBlock
////////////////////////////////////////////////////////////////////////////////

View File

@ -989,6 +989,9 @@ ArangoCollection.prototype.replaceByExample = function (example, newValue, waitF
/// The document meta-attributes such as *_id*, *_key*, *_from*,
/// *_to* cannot be updated.
///
/// Partial update could also be used to append new fields,
/// if there were no old field with same name.
///
/// `collection.updateByExample(document, newValue, keepNull, waitForSync)`
///
/// The optional *keepNull* parameter can be used to modify the behavior when
@ -1019,8 +1022,9 @@ ArangoCollection.prototype.replaceByExample = function (example, newValue, waitF
///
/// @EXAMPLE_ARANGOSH_OUTPUT{012_documentsCollectionUpdateByExample}
/// ~ db._create("example");
/// db.example.save({ Hello : "world" });
/// db.example.save({ Hello : "world", foo : "bar" });
/// db.example.updateByExample({ Hello: "world" }, { Hello: "foo", World: "bar" }, false);
/// db.example.byExample({ Hello: "foo" }).toArray()
/// ~ db._drop("example");
/// @END_EXAMPLE_ARANGOSH_OUTPUT
/// @endDocuBlock