mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
2df81da99d
|
@ -39,6 +39,7 @@ install_bits:
|
|||
cp -a V8-3.29.59/build/Release$(BITS)/lib/*.lib ../WindowsLibraries/$(BITS)/lib/Release
|
||||
cp -a V8-3.29.59/build/Debug$(BITS)/lib/*.lib ../WindowsLibraries/$(BITS)/lib/Debug
|
||||
cp -a V8-3.29.59/include/* ../WindowsLibraries/$(BITS)/include
|
||||
cp V8-3.29.59/third_party/icu/source/data/in/icudtl.dat ../WindowsLibraries/$(BITS)/icudtl.dat
|
||||
|
||||
for f in common i18n io; do \
|
||||
cp -a V8-3.29.59/third_party/icu/source/$${f}/unicode/* ../WindowsLibraries/$(BITS)/include/unicode/; \
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
.PHONY: all install
|
||||
|
||||
all: build64 build32
|
||||
|
||||
|
||||
build64:
|
||||
./v8-build.bat x86_amd64 x64 x64 64
|
||||
|
||||
build32:
|
||||
./v8-build.bat x86 ia32 Win32 32
|
||||
|
||||
|
||||
clean: clean32 clean64
|
||||
|
||||
clean64:
|
||||
./v8-clean.bat cmd x86_amd64 x64 x64 64
|
||||
|
||||
clean32:
|
||||
./v8-clean.bat x86 ia32 Win32 32
|
||||
|
||||
|
||||
distclean: distclean32 distclean64
|
||||
|
||||
distclean64:
|
||||
./v8-distclean.bat x86_amd64 x64 x64 64
|
||||
|
||||
distclean32:
|
||||
./v8-distclean.bat x86 ia32 Win32 32
|
||||
|
||||
|
||||
install:
|
||||
$(MAKE) -f Makefile.v8-windows install_bits BITS=32
|
||||
$(MAKE) -f Makefile.v8-windows install_bits BITS=64
|
||||
|
||||
install_bits:
|
||||
mkdir -p ../WindowsLibraries/$(BITS)/lib
|
||||
mkdir -p ../WindowsLibraries/$(BITS)/include/unicode
|
||||
|
||||
cp -a V8-3.29.59/build/Release$(BITS)/lib/*.lib ../WindowsLibraries/$(BITS)/lib
|
||||
cp -a V8-3.29.59/include/* ../WindowsLibraries/$(BITS)/include
|
||||
|
||||
for f in common i18n io; do \
|
||||
cp -a V8-3.29.59/third_party/icu/source/$${f}/unicode/* ../WindowsLibraries/$(BITS)/include/unicode/; \
|
||||
done
|
||||
|
||||
|
||||
emil:
|
||||
for f in common i18n extra/uconv tools/ctestfw io; do
|
||||
rm -rf ../out/vs2013-V8-$(BITS)
|
||||
|
||||
mkdir ../out/vs2013-V8-$(BITS)
|
||||
mkdir ../out/vs2013-V8-$(BITS)/include
|
||||
mkdir ../out/vs2013-V8-$(BITS)/lib
|
||||
mkdir ../out/vs2013-V8-$(BITS)/lib/Release
|
||||
mkdir ../out/vs2013-V8-$(BITS)/lib/Debug
|
||||
mkdir -p ../out/vs2013-icu-$(BITS)/include/layout/
|
||||
mkdir -p ../out/vs2013-icu-$(BITS)/include/unicode/
|
||||
|
||||
cp -a V8-3.29.59/build/Debug$(BITS)/lib/*.lib ../out/vs2013-V8-$(BITS)/lib/Debug
|
||||
cp -a V8-3.29.59/build/Release$(BITS)/lib/*.lib ../out/vs2013-V8-$(BITS)/lib/Release
|
||||
cp -a V8-3.29.59/include/* ../out/vs2013-V8-$(BITS)/include
|
||||
|
||||
for FOLDER in common \
|
||||
i18n \
|
||||
extra/uconv \
|
||||
tools/ctestfw \
|
||||
io ; \
|
||||
do \
|
||||
cp -a V8-3.29.59/third_party/icu/source/$${FOLDER}/unicode/* ../out/vs2013-icu-$(BITS)/include/unicode/ ;\
|
||||
done
|
|
@ -449,7 +449,7 @@ endif ()
|
|||
################################################################################
|
||||
|
||||
if (MSVC)
|
||||
set(ICU_LIBS "icui18n;icuuc;icudata" CACHE path "ICU libraries")
|
||||
set(ICU_LIBS "icui18n;icuuc" CACHE path "ICU libraries")
|
||||
|
||||
add_definitions("-DU_STATIC_IMPLEMENTATION=1")
|
||||
elseif (RASPBIAN)
|
||||
|
@ -835,9 +835,17 @@ if (MSVC)
|
|||
if(CMAKE_CL_64)
|
||||
install(PROGRAMS WindowsLibraries/64/bin/etcd-arango.exe
|
||||
DESTINATION ${TRI_SBINDIR_INSTALL})
|
||||
|
||||
install(FILES WindowsLibraries/64/icudtl.dat
|
||||
DESTINATION share/arangodb
|
||||
RENAME icudt52l.dat)
|
||||
else()
|
||||
install(PROGRAMS WindowsLibraries/32/bin/etcd-arango.exe
|
||||
DESTINATION ${TRI_SBINDIR_INSTALL})
|
||||
|
||||
install(FILES WindowsLibraries/32/icudtl.dat
|
||||
DESTINATION share/arangodb
|
||||
RENAME icudt52l.dat)
|
||||
endif()
|
||||
|
||||
endif ()
|
||||
|
|
|
@ -22,7 +22,7 @@ existing collection named "users" on the server.
|
|||
Let's further assume the import at hand is encoded in JSON. We'll be using these
|
||||
example user records to import:
|
||||
|
||||
``` js
|
||||
```js
|
||||
{ "name" : { "first" : "John", "last" : "Connor" }, "active" : true, "age" : 25, "likes" : [ "swimming"] }
|
||||
{ "name" : { "first" : "Jim", "last" : "O'Brady" }, "age" : 19, "likes" : [ "hiking", "singing" ] }
|
||||
{ "name" : { "first" : "Lisa", "last" : "Jones" }, "dob" : "1981-04-09", "likes" : [ "running" ] }
|
||||
|
|
|
@ -156,7 +156,7 @@ follows
|
|||
* If no file can be found, ArangoDB will check if the collection *_modules*
|
||||
contains a document of the form
|
||||
|
||||
```js
|
||||
```js
|
||||
{
|
||||
path: "/com/example/extension",
|
||||
content: "...."
|
||||
|
|
|
@ -42,10 +42,17 @@ More details on the available ES6 features can be found in
|
|||
|
||||
!SECTION FoxxGenerator
|
||||
|
||||
ArangoDB 2.4 is shipped with FoxxGenerator, a framework for building
|
||||
standardized Hypermedia APIs easily. The generated APIs can be consumed with
|
||||
ArangoDB 2.4 is shipped with FoxxGenerator, a framework for building
|
||||
standardized Hypermedia APIs easily. The generated APIs can be consumed with
|
||||
client tools that understand [Siren](https://github.com/kevinswiber/siren).
|
||||
|
||||
Hypermedia is the simple idea that our HTTP APIs should have links between their
|
||||
endpoints in the same way that our web sites have links between
|
||||
them. FoxxGenerator is based on the idea that you can represent an API as a
|
||||
statechart: Every endpoint is a state and the links are the transitions between
|
||||
them. Using your description of states and transitions, it can then create an
|
||||
API for you.
|
||||
|
||||
The FoxxGenerator can create APIs based on a semantic description of entities
|
||||
and transitions. A blog series on the use cases and how to use the Foxx generator
|
||||
is here:
|
||||
|
|
|
@ -66,7 +66,7 @@ the operations inside the transactions demand for it.
|
|||
The contents of *read* or *write* can each be lists with collection names or a
|
||||
single collection name (as a string):
|
||||
|
||||
```js
|
||||
```js
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
write: "users",
|
||||
|
@ -202,7 +202,8 @@ db._executeTransaction({
|
|||
|
||||
Aborting the transaction by throwing an exception in the *action* function
|
||||
will revert all changes, so as if the transaction never happened:
|
||||
``` js
|
||||
|
||||
```js
|
||||
// setup
|
||||
db._create("c1");
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"theme": "./localtheme",
|
||||
"plugins":["-mathjax"],
|
||||
"plugins": ["piwik"],
|
||||
"pluginsConfig": {
|
||||
"piwik": {
|
||||
"URL": "www.arangodb.org/piwik/",
|
||||
"siteId": 12
|
||||
}
|
||||
},
|
||||
"pdf": {
|
||||
"fontSize": 12,
|
||||
"toc": true,
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
#include "Basics/tri-strings.h"
|
||||
#include "Basics/utf8-helper.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Basics/win-utils.h"
|
||||
#endif
|
||||
|
||||
using namespace triagens::basics;
|
||||
using namespace std;
|
||||
|
||||
|
@ -107,6 +111,10 @@ int Utf8Helper::compareUtf16 (const uint16_t* left, size_t leftLength, const uin
|
|||
}
|
||||
|
||||
void Utf8Helper::setCollatorLanguage (std::string const& lang) {
|
||||
#ifdef _WIN32
|
||||
TRI_FixIcuDataEnv();
|
||||
#endif
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
if (_coll) {
|
||||
|
|
|
@ -1618,7 +1618,32 @@ char* TRI_BinaryName (const char* argv0) {
|
|||
|
||||
char* TRI_LocateBinaryPath (char const* argv0) {
|
||||
char const* p;
|
||||
char* binaryPath = NULL;
|
||||
char* binaryPath = nullptr;
|
||||
|
||||
#if _WIN32
|
||||
if (argv0 == nullptr) {
|
||||
char buff[4096];
|
||||
int res = GetModuleFileName(NULL, buff, sizeof(buff));
|
||||
|
||||
if (res != 0) {
|
||||
buff[4095] = '\0';
|
||||
|
||||
char* q = buff + res;
|
||||
while (buff < q) {
|
||||
if (*q == '\\' || *q == '/') {
|
||||
*q = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
--q;
|
||||
}
|
||||
|
||||
return TRI_DuplicateString(buff);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
// check if name contains a '/' ( or '\' for windows)
|
||||
p = argv0;
|
||||
|
@ -1630,7 +1655,7 @@ char* TRI_LocateBinaryPath (char const* argv0) {
|
|||
if (*p) {
|
||||
binaryPath = TRI_Dirname(argv0);
|
||||
|
||||
if (binaryPath == 0) {
|
||||
if (binaryPath == nullptr) {
|
||||
binaryPath = TRI_DuplicateString("");
|
||||
}
|
||||
}
|
||||
|
@ -1639,7 +1664,7 @@ char* TRI_LocateBinaryPath (char const* argv0) {
|
|||
else {
|
||||
p = getenv("PATH");
|
||||
|
||||
if (p == 0) {
|
||||
if (p == nullptr) {
|
||||
binaryPath = TRI_DuplicateString("");
|
||||
}
|
||||
else {
|
||||
|
@ -2075,7 +2100,7 @@ char * __LocateInstallDirectory_In(HKEY rootKey) {
|
|||
// open the key for reading
|
||||
long lResult = RegOpenKeyEx(
|
||||
rootKey,
|
||||
"SOFTWARE\\triAGENS GmbH\\ArangoDB " TRI_VERSION,
|
||||
"SOFTWARE\\ArangoDB GmbH\\ArangoDB " TRI_VERSION,
|
||||
0,
|
||||
KEY_READ,
|
||||
&key);
|
||||
|
|
|
@ -28,13 +28,22 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#include "win-utils.h"
|
||||
#include "Basics/logging.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <crtdbg.h>
|
||||
|
||||
#include "Basics/logging.h"
|
||||
#include "Basics/files.h"
|
||||
#include "Basics/StringUtils.h"
|
||||
#include "Basics/tri-strings.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace triagens::basics;
|
||||
|
||||
// .............................................................................
|
||||
// Some global variables which may be required throughout the lifetime of the
|
||||
// server
|
||||
|
@ -339,6 +348,42 @@ int TRI_OPEN_WIN32 (const char* filename, int openFlags) {
|
|||
return fileDescriptor;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief fixes the ICU_DATA environment path
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void TRI_FixIcuDataEnv () {
|
||||
if (getenv("ICU_DATA") != nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
char* p = nullptr;
|
||||
|
||||
p = TRI_LocateInstallDirectory();
|
||||
|
||||
if (p != nullptr) {
|
||||
string e = string("ICU_DATA=") + p + "\\share\\arangodb\\";
|
||||
e = StringUtils::replace(e, "\\", "\\\\");
|
||||
putenv(e.c_str());
|
||||
}
|
||||
else {
|
||||
p = TRI_LocateBinaryPath(nullptr);
|
||||
|
||||
if (p != nullptr) {
|
||||
string e = string("ICU_DATA=") + p + "\\";
|
||||
e = StringUtils::replace(e, "\\", "\\\\");
|
||||
putenv(e.c_str());
|
||||
}
|
||||
else {
|
||||
putenv("ICU_DATA=.\\\\");
|
||||
}
|
||||
}
|
||||
|
||||
if (p != nullptr) {
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, p);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -95,6 +95,12 @@ void TRI_sleep (unsigned long);
|
|||
|
||||
void TRI_usleep (unsigned long);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief fixes the ICU_DATA environment path
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void TRI_FixIcuDataEnv ();
|
||||
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue