1
0
Fork 0

Merge branch 'solaris' of github.com:arangodb/arangodb into solaris

Conflicts:
	CMakeLists.txt
This commit is contained in:
Frank Celler 2016-02-24 22:41:00 +01:00
commit 8c632cae24
6 changed files with 155 additions and 206 deletions

View File

@ -147,7 +147,7 @@ find_package(PythonInterp 2)
find_package(Go 1.2)
if (NOT GO_FOUND)
message ("Go version >=1.2 not found. etcd will not be built.")
message("Go version >=1.2 not found. etcd will not be built.")
endif ()
################################################################################
@ -385,24 +385,44 @@ endif ()
## BOOST
################################################################################
option(AR_USE_SYSTEM_LIBS "use libraries provided by the system" OFF)
option(USE_BOOST_SYSTEM_LIBS "use libraries provided by the system" OFF)
set(Boost_USE_MULTITHREADED ON)
set(BOOST_MINIMUM_VERSION 1.58)
set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/1.58.0 CACHE path "BOOST include path")
if (USE_BOOST_SYSTEM_LIBS)
find(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)
else ()
set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/${BOOST_MINIMUM_VERSION}.0 CACHE path "BOOST include path")
set(Boost_INCLUDE_DIR ${BOOST_INCLUDE})
set(Boost_VERSION ${BOOST_MINIMUM_VERSION})
endif ()
set(Boost_INCLUDE_DIR ${BOOST_INCLUDE})
find_package(Boost COMPONENTS unit_test_framework)
find_package(Boost ${Boost_VERSION} EXACT COMPONENTS unit_test_framework)
if (${Boost_UNIT_TEST_FRAMEWORK_FOUND})
option(USE_BOOST_UNITTESTS "use boost unit-tests" ON)
try_compile(
HAVE_USABLE_BOOT_LIBRARIES
"${CMAKE_BINARY_DIR}/temp"
"${CMAKE_SOURCE_DIR}/cmake/test_boost.cpp"
LINK_LIBRARIES
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIR}"
)
if (HAVE_USABLE_BOOT_LIBRARIES)
option(USE_BOOST_UNITTESTS "use boost unit-tests" ON)
else ()
message("cannot use BOOST library ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}")
option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF)
endif ()
else ()
option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF)
endif ()
if (NOT USE_BOOST_UNITTESTS)
message ("BOOST unit tests are disabled")
message("BOOST unit tests are disabled")
endif ()
find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)

View File

@ -1,38 +1,56 @@
# -*- mode: CMAKE; -*-
set(MAN_NAMES
man1/arangob.1
man1/arangodump.1
man1/arangoimp.1
man1/arangorestore.1
man1/arangosh.1
man8/rcarangod.8
man8/arangod.8
man8/arango-dfdb.8
man8/foxx-manager.8
)
if (USE_MAINTAINER_MODE)
set(MAN_NAMES
man1/arangob.1
man1/arangodump.1
man1/arangoimp.1
man1/arangorestore.1
man1/arangosh.1
man8/rcarangod.8
man8/arangod.8
man8/arango-dfdb.8
man8/foxx-manager.8
)
set(MAN_FILES)
set(MAN_FILES)
foreach (m IN LISTS MAN_NAMES)
set(msrc ${CMAKE_SOURCE_DIR}/Documentation/${m})
set(mdst ${CMAKE_SOURCE_DIR}/Documentation/man/${m})
foreach (m IN LISTS MAN_NAMES)
set(msrc ${CMAKE_SOURCE_DIR}/Documentation/${m})
set(mdst ${CMAKE_SOURCE_DIR}/Documentation/man/${m})
add_custom_command(
OUTPUT
${mdst}
COMMAND
${CMAKE_SOURCE_DIR}/utils/manPages.sh ${msrc} ${mdst} ${ARANGODB_VERSION}
DEPENDS
${msrc}
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
COMMENT
"Building manpage ${mdst}"
VERBATIM
)
list(APPEND MAN_FILES ${mdst})
endforeach ()
add_custom_command(
OUTPUT
${mdst}
${CMAKE_SOURCE_DIR}/README
COMMAND
${CMAKE_SOURCE_DIR}/utils/manPages.sh ${msrc} ${mdst} ${ARANGODB_VERSION}
${CMAKE_SOURCE_DIR}/utils/generateREADME.sh ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/README
DEPENDS
${msrc}
${CMAKE_SOURCE_DIR}/README.md
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}
COMMENT
"Building manpage ${mdst}"
"Building README"
VERBATIM
)
list(APPEND MAN_FILES ${mdst})
endforeach ()
list(APPEND MAN_FILES ${CMAKE_SOURCE_DIR}/README)
add_custom_target(man ALL DEPENDS ${MAN_FILES})
add_custom_target(man ALL DEPENDS ${MAN_FILES})
endif ()

View File

@ -18,84 +18,11 @@ warning:
@echo " cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
@echo ""
-include Makefile
VERSION_MAJOR := $(wordlist 1,1,$(subst ., ,$(VERSION)))
VERSION_MINOR := $(wordlist 2,2,$(subst ., ,$(VERSION)))
VERSION_PATCH := $(wordlist 3,3,$(subst ., ,$(VERSION)))
VERSION_PATCH := $(wordlist 1,1,$(subst -, ,$(VERSION_PATCH)))
## -----------------------------------------------------------------------------
## --SECTION-- SPECIAL TARGETS
## -----------------------------------------------------------------------------
################################################################################
### @brief setup
################################################################################
.PHONY: setup
setup:
@echo ACLOCAL
@aclocal -I m4
@echo AUTOMAKE
@automake --add-missing --force-missing --copy
@echo AUTOCONF
@autoconf -I m4
@echo auto system configured, proceed with configure
################################################################################
### @brief add maintainer files
################################################################################
MAINTAINER = \
README \
arangod/Aql/tokens.cpp \
arangod/Aql/grammar.cpp \
arangod/Aql/grammar.h \
lib/JsonParser/json-parser.cpp \
lib/V8/v8-json.cpp \
lib/Basics/voc-errors.h \
lib/Basics/voc-errors.cpp \
js/common/bootstrap/errors.js
AUTOMAGIC = \
Makefile.in \
aclocal.m4 \
configure \
config/compile \
config/config.guess \
config/config.sub \
config/depcomp \
config/install-sh \
config/missing
.PHONY: add-maintainer add-automagic
add-maintainer:
@echo adding generated files to GIT
git add -f $(MAINTAINER)
remove-maintainer:
@echo removing generated files from GIT
git rm -f $(MAINTAINER)
add-automagic:
@echo adding automagic files to GIT
git add -f $(AUTOMAGIC)
remove-automagic:
@echo removing automagic files from GIT
git rm -f $(AUTOMAGIC)
################################################################################
### @brief make love
################################################################################
love:
@echo ArangoDB loves you
## -----------------------------------------------------------------------------
## --SECTION-- CMAKE & CPACK
## -----------------------------------------------------------------------------
@ -392,36 +319,3 @@ packXX:
cd Build$(BITS) && cpack -G ZIP -D "BUILD_TARGET=RelWithDebInfo"
./Installation/Windows/installer-generator.sh $(BITS) $(shell pwd)
checkcmake:
if test -z "`cmake --help |grep -i visual`"; then \
echo "Your cmake is not sufficient; it lacks support for visual studio." ; \
exit 1; \
fi
################################################################################
### @brief generates a tar archive
################################################################################
.PHONY: pack-tar pack-tar-config
pack-tar-config:
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
pack-tar:
rm -rf /tmp/pack-arangodb
make install-strip DESTDIR=/tmp/pack-arangodb
tar -c -v -z -f arangodb-$(VERSION).tar.gz -C /tmp/pack-arangodb .
## -----------------------------------------------------------------------------
## --SECTION-- END-OF-FILE
## -----------------------------------------------------------------------------
## Local Variables:
## mode: outline-minor
## outline-regexp: "### @brief\\|## --SECTION--\\|# -\\*-"
## End:

129
README
View File

@ -1,5 +1,4 @@
ArangoDB
****** ArangoDB ******
ArangoDB is a multi-model, open-source database with flexible data models for
documents, graphs, and key-values. Build high performance applications using a
convenient SQL-like query language or JavaScript extensions. Use ACID
@ -10,19 +9,15 @@ To get started, try one of our 10 minutes tutorials in your favorite
programming language or try one of our ArangoDB_Cookbook_recipes.
For the impatient: download and install ArangoDB. Start the server arangod and
point your browser to http://127.0.0.1:8529/.
Key Features in ArangoDB
* Multi-Model: Documents, graphs and key-value pairs — model your data as you
see fit for your application.
* Joins: Conveniently join what belongs together for flexible ad-hoc querying,
less data redundancy.
* Transactions: Easy application development keeping your data consistent and
safe. No hassle in your client.
***** Key Features in ArangoDB *****
* Multi-Model: Documents, graphs and key-value pairs — model your data as
you see fit for your application.
* Joins: Conveniently join what belongs together for flexible ad-hoc
querying, less data redundancy.
* Transactions: Easy application development keeping your data consistent
and safe. No hassle in your client.
Here is an AQL query that makes use of all those features:
AQL Query Example AQL Query Example
[AQL Query Example]
Joins and transactions are key features for flexible, secure data designs,
widely used in relational databases but lacking in many NoSQL products.
However, there is no need to forego them in ArangoDB. You decide how and when
@ -32,73 +27,67 @@ Furthermore, ArangoDB offers a JavaScript framework called Foxx that is
executed in the database server with direct access to the data. Build your own
data-centric microservices with a few lines of code:
Microservice Example
Microservice Example Microservice Example
[Microservice Example]
By extending the HTTP API with user code written in JavaScript, ArangoDB can be
turned into a strict schema-enforcing persistence engine.
Next step, bundle your Foxx application as a docker_container and get it
running in the cloud.
Other features of ArangoDB include:
* Schema-free schemata let you combine the space efficiency of MySQL with the
performance power of NoSQL
* Use a data-centric microservices approach with ArangoDB Foxx and fuse your
application-logic and database together for maximal throughput
* JavaScript for all: no language zoo, you can use one language from your
browser to your back-end
* ArangoDB is multi-threaded - exploit the power of all your cores
* Flexible data modeling: model your data as combination of key-value pairs,
documents or graphs - perfect for social relations
* Free index choice: use the correct index for your problem, be it a skip list
or a fulltext search
* Configurable durability: let the application decide if it needs more
durability or more performance
* Powerful query language (AQL) to retrieve and modify data
* Transactions: run queries on multiple documents or collections with optional
transactional consistency and isolation
* Replication and Sharding: set up the database in a master-slave configuration
or spread bigger datasets across multiple servers
* It is open source (Apache License 2.0)
* Schema-free schemata let you combine the space efficiency of MySQL with
the performance power of NoSQL
* Use a data-centric microservices approach with ArangoDB Foxx and fuse
your application-logic and database together for maximal throughput
* JavaScript for all: no language zoo, you can use one language from your
browser to your back-end
* ArangoDB is multi-threaded - exploit the power of all your cores
* Flexible data modeling: model your data as combination of key-value
pairs, documents or graphs - perfect for social relations
* Free index choice: use the correct index for your problem, be it a skip
list or a fulltext search
* Configurable durability: let the application decide if it needs more
durability or more performance
* Powerful query language (AQL) to retrieve and modify data
* Transactions: run queries on multiple documents or collections with
optional transactional consistency and isolation
* Replication and Sharding: set up the database in a master-slave
configuration or spread bigger datasets across multiple servers
* It is open source (Apache License 2.0)
For more in-depth information read the design_goals_of_ArangoDB
Latest Release - ArangoDB 2.6
The What’s_new_in_ArangoDB_2.6 can be found in the documentation.
New collection export HTTP REST API: ArangoDB now provides a dedicated
collection export API, which can take snapshots of entire collections more
efficiently than the general-purpose cursor API. The export API is useful to
transfer the contents of an entire collection to a client application.
Added batch document removal and lookup commands: The commands
collection.lookupByKeys(keys) and collection.removeByKeys(keys) have been added
for collection objects. These can be used to perform multi-document lookup and
removal operations efficiently from the ArangoShell.
Added AQL UPSERT command: This adds an UPSERT statement to AQL that is a
combination of both INSERT and UPDATE / REPLACE. The UPSERT will search for a
matching document using a user-provided example. If no document matches the
example, the insert part of the UPSERT statement will be executed. If there is
a match, the update / replace part will be carried out.
We have simplified the return value syntax for data-modification AQL queries,
added an alternative implementation for AQL COLLECT that uses a hash table for
grouping and does not require its input elements to be sorted.
Other optimizations and speedups in AQL relate to subqueries, return values and
queries containing big IN lists for index lookups.
Arangoimp can now optionally update or replace existing documents, provided the
import data contains documents with _key attributes.
***** Latest Release - ArangoDB 2.8 *****
The What's_new_in_ArangoDB_2.8 can be found in the documentation.
AQL Graph Traversals / Pattern Matching: AQL offers a new feature to traverse
over a graph without writing JavaScript functions but with all the other
features you know from AQL. For this purpose, a special version of FOR
variable-name IN expression has been introduced.
The added Array Indexes are a major improvement to ArangoDB that you will love
and never want to miss again. Hash indexes and skiplist indexes can now be
defined for array values as well, so its freaking fast to access documents
by individual array values.
Additional, there is a cool new aggregation feature that was added after the
beta releases. AQL introduces the keyword AGGREGATE for use in AQL COLLECT
statements. Using AGGREGATE allows more efficient aggregation (incrementally
while building the groups) than previous versions of AQL, which built group
aggregates afterwards from the total of all group values
Optimizer improvements: The AQL query optimizer can now use indexes if multiple
filter conditions on attributes of the same collection are combined with
logical ORs, and if the usage of indexes would completely cover these
conditions.
ArangoDB 2.8 now has an automatic deadlock detection for transactions. A
deadlock is a situation in which two or more concurrent operations (user
transactions or AQL queries) try to access the same resources (collections,
documents) and need to wait for the others to finish, but none of them can make
any progress.
Foxx Improvements
Added Configuration and Dependencies so that manifests can now define
configuration options, as well as dependencies on other Foxx apps. With the
Mocha Test framework you can now write_tests_for_your_Foxx_apps. The API
documentation has been updated to Swagger 2.
More Information
The module resolution used by require now behaves more like in node.js. The
org/arangodb/request module now returns response bodies for error responses by
default. The old behavior of not returning bodies for error responses can be
re-enabled by explicitly setting the option returnBodyOnError to false.
***** More Information *****
Please check the Installation_Manual for installation and compilation
instructions.
The User_Manual has an introductory chapter showing the basic operations of
ArangoDB.
Stay in Contact
***** Stay in Contact *****
We really appreciate feature requests and bug reports. Please use our Github
issue tracker for reporting them:
https://github.com/arangodb/arangodb/issues

14
cmake/test_boost.cpp Normal file
View File

@ -0,0 +1,14 @@
#include <boost/test/unit_test.hpp>
struct TestSetup {
TestSetup() {
BOOST_TEST_MESSAGE("test message");
}
};
BOOST_FIXTURE_TEST_SUITE(Test, TestSetup)
BOOST_AUTO_TEST_CASE (test_Test1) {
}
BOOST_AUTO_TEST_SUITE_END()

14
utils/generateREADME.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
IN=${1:-README.md}
OUT=${2:-README}
fgrep -v "[Build Status]" $IN \
| fgrep -v "ArangoDB-Logo" \
| fgrep -v "[Build Status]" \
| markdown \
| html2text -style compact -nobs \
| sed -e 's:&gt;:>:g' \
| awk 'BEGIN { s = 0; } { if (length($0) == 0) {if (s != 0) print $0;} else {s = 1; print $0; }}' \
> $OUT