mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
2c640965b8
|
@ -53,6 +53,22 @@ core
|
||||||
TAGS
|
TAGS
|
||||||
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/Examples/*.generated
|
||||||
Documentation/Books/Users/book.json
|
Documentation/Books/Users/book.json
|
||||||
Documentation/Books/Users/manual.epub
|
Documentation/Books/Users/manual.epub
|
||||||
|
|
|
@ -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
|
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.
|
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
|
!SECTION Working with Edges
|
||||||
|
|
||||||
!SUBSECTION Insert
|
!SUBSECTION Insert
|
||||||
|
|
|
@ -1,8 +1,19 @@
|
||||||
arangosh> db.example.save({ Hello : "world" });
|
arangosh> db.example.save({ Hello : "world", foo : "bar" });
|
||||||
{
|
{
|
||||||
"_id" : "example/450753419",
|
"_id" : "example/450817260",
|
||||||
"_rev" : "450753419",
|
"_rev" : "450817260",
|
||||||
"_key" : "450753419"
|
"_key" : "450817260"
|
||||||
}
|
}
|
||||||
arangosh> db.example.updateByExample({ Hello: "world" }, { Hello: "foo", World: "bar" }, false);
|
arangosh> db.example.updateByExample({ Hello: "world" }, { Hello: "foo", World: "bar" }, false);
|
||||||
1
|
1
|
||||||
|
arangosh> db.example.byExample({ Hello: "foo" }).toArray()
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"_id" : "example/450817260",
|
||||||
|
"_key" : "450817260",
|
||||||
|
"_rev" : "451144940",
|
||||||
|
"Hello" : "foo",
|
||||||
|
"foo" : "bar",
|
||||||
|
"World" : "bar"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
|
@ -2963,8 +2963,8 @@ static string GetId (const v8::FunctionCallbackInfo<v8::Value>& args, int which)
|
||||||
/// @EXAMPLES
|
/// @EXAMPLES
|
||||||
///
|
///
|
||||||
/// @EXAMPLE_ARANGOSH_OUTPUT{EDGCOL_01_SaveEdgeCol}
|
/// @EXAMPLE_ARANGOSH_OUTPUT{EDGCOL_01_SaveEdgeCol}
|
||||||
/// ~ db._create("vertex");
|
/// db._create("vertex");
|
||||||
/// ~ db._createEdgeCollection("relation");
|
/// db._createEdgeCollection("relation");
|
||||||
/// v1 = db.vertex.insert({ name : "vertex 1" });
|
/// v1 = db.vertex.insert({ name : "vertex 1" });
|
||||||
/// v2 = db.vertex.insert({ name : "vertex 2" });
|
/// v2 = db.vertex.insert({ name : "vertex 2" });
|
||||||
/// e1 = db.relation.insert(v1, v2, { label : "knows" });
|
/// e1 = db.relation.insert(v1, v2, { label : "knows" });
|
||||||
|
|
|
@ -3358,8 +3358,13 @@ static void CreateDatabaseCoordinator (const v8::FunctionCallbackInfo<v8::Value>
|
||||||
/// require("org/arangodb/users").update(username, password, true);
|
/// require("org/arangodb/users").update(username, password, true);
|
||||||
/// require("org/arangodb/users").remove(username);
|
/// 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
|
/// @endDocuBlock
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -989,6 +989,9 @@ ArangoCollection.prototype.replaceByExample = function (example, newValue, waitF
|
||||||
/// The document meta-attributes such as *_id*, *_key*, *_from*,
|
/// The document meta-attributes such as *_id*, *_key*, *_from*,
|
||||||
/// *_to* cannot be updated.
|
/// *_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)`
|
/// `collection.updateByExample(document, newValue, keepNull, waitForSync)`
|
||||||
///
|
///
|
||||||
/// The optional *keepNull* parameter can be used to modify the behavior when
|
/// 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}
|
/// @EXAMPLE_ARANGOSH_OUTPUT{012_documentsCollectionUpdateByExample}
|
||||||
/// ~ db._create("example");
|
/// ~ 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.updateByExample({ Hello: "world" }, { Hello: "foo", World: "bar" }, false);
|
||||||
|
/// db.example.byExample({ Hello: "foo" }).toArray()
|
||||||
/// ~ db._drop("example");
|
/// ~ db._drop("example");
|
||||||
/// @END_EXAMPLE_ARANGOSH_OUTPUT
|
/// @END_EXAMPLE_ARANGOSH_OUTPUT
|
||||||
/// @endDocuBlock
|
/// @endDocuBlock
|
||||||
|
|
Loading…
Reference in New Issue