1
0
Fork 0

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

This commit is contained in:
Jan Steemann 2012-05-14 23:30:30 +02:00
commit 54c60a32b5
65 changed files with 1725 additions and 900 deletions

View File

@ -41,31 +41,31 @@
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineLoggingTOC
///
/// <ol>
/// <ul>
/// <li>@ref CommandLineLoggingGeneral
/// <ol>
/// <ul>
/// <li>@ref CommandLineLoggingLogFile "log.file"</li>
/// <li>@ref CommandLineLoggingLogSeverity "log.severity"</li>
/// <li>@ref CommandLineLoggingLogSyslog "log.syslog"</li>
/// </ol>
/// </ul>
/// </li>
/// <li>@ref CommandLineLoggingHuman
/// <ol>
/// <ul>
/// <li>@ref CommandLineLoggingLogLevel "log.level"</li>
/// <li>@ref CommandLineLoggingLogLineNumber "log.line-number"</li>
/// <li>@ref CommandLineLoggingLogPrefix "log.prefix"</li>
/// <li>@ref CommandLineLoggingLogThread "log.thread"</li>
/// </ol>
/// </ul>
/// </li>
/// <li>@ref CommandLineLoggingMachine
/// <ol>
/// <ul>
/// <li>@ref CommandLineLoggingLogApplication "log.application"</li>
/// <li>@ref CommandLineLoggingLogFacility "log.facility"</li>
/// <li>@ref CommandLineLoggingLogFormat "log.format"</li>
/// <li>@ref CommandLineLoggingLogHostName "log.hostname"</li>
/// </ol>
/// </ul>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
@ -77,20 +77,14 @@
/// are used to provide statistics about executed requests and timings about
/// computation steps.
///
/// <hr>
/// @copydoc CommandLineLoggingTOC
/// <hr>
///
/// @section CommandLineLoggingGeneral General Logging Options
//////////////////////////////////////////////////////////////
///
/// @anchor CommandLineLoggingLogFile
/// @copydetails triagens::rest::ApplicationServerImpl::logFile
/// <hr>
///
/// @anchor CommandLineLoggingLogSeverity
/// @copydetails triagens::rest::ApplicationServerImpl::logSeverity
/// <hr>
///
/// @anchor CommandLineLoggingLogSyslog
/// @copydetails triagens::rest::ApplicationServerImpl::logSyslog
@ -100,34 +94,27 @@
///
/// @anchor CommandLineLoggingLogLevel
/// @copydetails triagens::rest::ApplicationServerImpl::logLevel
/// <hr>
///
/// @anchor CommandLineLoggingLogLineNumber
/// @copydetails triagens::rest::ApplicationServerImpl::logLineNumber
/// <hr>
///
/// @anchor CommandLineLoggingLogPrefix
/// @copydetails triagens::rest::ApplicationServerImpl::logPrefix
/// <hr>
///
/// @anchor CommandLineLoggingLogThread
/// @copydetails triagens::rest::ApplicationServerImpl::logThreadId
/// <hr>
///
/// @section CommandLineLoggingMachine Maschine Readable Logging
////////////////////////////////////////////////////////////////
///
/// @anchor CommandLineLoggingLogApplication
/// @copydetails triagens::rest::ApplicationServerImpl::logApplicationName
/// <hr>
///
/// @anchor CommandLineLoggingLogFacility
/// @copydetails triagens::rest::ApplicationServerImpl::logFacility
/// <hr>
///
/// @anchor CommandLineLoggingLogFormat
/// @copydetails triagens::rest::ApplicationServerImpl::logFormat
/// <hr>
///
/// @anchor CommandLineLoggingLogHostName
/// @copydetails triagens::rest::ApplicationServerImpl::logHostName
@ -136,19 +123,15 @@
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineRandomTOC
///
/// <ol>
/// <ul>
/// <li>@ref CommandLineRandomGenerator "random.generator"</li>
/// <li>@ref CommandLineRandomGenerator "random.no-seed"</li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineRandom Command-Line Options for Random Numbers
///
/// <hr>
/// @copydoc CommandLineRandomTOC
/// <hr>
///
/// @anchor CommandLineRandomGenerator
/// @copydetails triagens::rest::ApplicationServerImpl::randomGenerator
////////////////////////////////////////////////////////////////////////////////
@ -665,8 +648,6 @@ namespace triagens {
/// algorithm. Algorithm 4 is a combination of the blocking random number
/// generator and the Mersenne Twister.
///
/// <hr>
///
/// @CMDOPT{--random.no-seed}
///
/// By default, the random generator is seeded. Setting this option causes the

View File

@ -35,32 +35,23 @@
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineSchedulerTOC
///
/// <ol>
/// <ul>
/// <li>@ref CommandLineSchedulerThreads "scheduler.threads"</li>
/// <li>@ref CommandLineSchedulerBackend "scheduler.backend"</li>
/// <li>@ref CommandLineSchedulerShowIoBackends "show-io-backends"</li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineScheduler Command-Line Options for Communication
///
/// <hr>
/// @copydoc CommandLineSchedulerTOC
/// <hr>
///
/// @anchor CommandLineSchedulerThreads
///////////////////////////////////////
/// @copydetails triagens::rest::ApplicationServerSchedulerImpl::_nrSchedulerThreads
/// <hr>
///
/// @anchor CommandLineSchedulerBackend
///////////////////////////////////////
/// @copydetails triagens::rest::ApplicationServerSchedulerImpl::_backend
/// <hr>
///
/// @anchor CommandLineSchedulerShowIoBackends
//////////////////////////////////////////////
/// @CMDOPT{--show-io-backends}
///
/// If this option is specified, then the server will list available backends

View File

@ -0,0 +1,16 @@
> ./arangosh --help
STANDARD options:
--help help message
--log.level <string> log level (default: "info")
--max-upload-size <uint64> maximum size of import chunks (default: 500000)
--no-auto-complete disable auto completion
--no-colors deactivate color support
--pager <string> output pager (default: "less -X -R -F -L")
--pretty-print pretty print values
--server <string> server address and port (default: "127.0.0.1:8529")
--startup.directory <string> startup paths containing the JavaScript files; multiple directories can be
separated by cola
--startup.modules-path <string> one or more directories separated by cola (default:
"./js/client/modules;./js/common/modules")
--unit-tests <string> do not start as shell, run unit tests instead
--use-pager use pager

View File

@ -1,26 +1,28 @@
> ./avocsh
_
__ ___ _____ ___ ___| |__
/ _` \ \ / / _ \ / __/ __| '_ \
| (_| |\ V / (_) | (__\__ \ | | |
\__,_| \_/ \___/ \___|___/_| |_|
> ./arangosh
_
__ _ _ __ __ _ _ __ __ _ ___ ___| |__
/ _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
\__,_|_| \__,_|_| |_|\__, |\___/|___/_| |_|
|___/
Welcome to avocsh x.y.z. Copyright (c) 2012 triAGENS GmbH.
Using Google V8 3.8.5 JavaScript engine.
Welcome to arangosh 0.5.0. Copyright (c) 2012 triAGENS GmbH.
Using Google V8 3.9.4 JavaScript engine.
Using READLINE 6.1.
Connected to Arango DB 127.0.0.1:8529 Version 0.x.y
Connected to Arango DB 127.0.0.1:8529 Version 0.5.0
------------------------------------- Help -------------------------------------
Predefined objects:
arango: ArangoConnection
db: ArangoDatabase
arango: ArangoConnection
db: ArangoDatabase
Example:
> db._collections(); list all collections
> db.<coll_name>.all(); list all documents
> id = db.<coll_name>.save({ ... }); save a document
> db.<coll_name>.delete(<_id>); delete a document
> db.<coll_name>.remove(<_id>); delete a document
> db.<coll_name>.document(<_id>); get a document
> help show help pages
> helpQueries query help
> exit
arangosh>

View File

@ -1,11 +0,0 @@
> ./avocsh --help
STANDARD options:
--help help message
--log.level <string> log level (default: "info")
--no-auto-complete disable auto completion
--no-colors deactivate color support
--pager <string> output pager (default: 'more') (default: "more")
--pretty-print pretty print values
--server <string> server address and port (default: "127.0.0.1:8529")
--startup <string> startup path containing the JavaScript files
--use-pager use pager

View File

@ -1,5 +1,6 @@
> ./arango --port 8529 /tmp/vocbase
2011-12-05T09:58:31Z [2690] INFO ArangoDB (version 1 (9711)) is ready for business
2011-12-05T09:58:31Z [2690] INFO HTTP client port: 8529
2011-12-05T09:58:31Z [2690] INFO HTTP admin port: localhost:8530
2011-12-05T09:58:31Z [2690] INFO Have Fun!
> ./arangod /tmp/vocbase
2012-05-13T12:37:08Z [8145] INFO no user init file '/home/fceller/.arango/arango.conf' found
2012-05-13T12:37:08Z [8145] INFO using built-in JavaScript startup files
2012-05-13T12:37:08Z [8145] INFO ArangoDB (version 0.5.0) is ready for business
2012-05-13T12:37:08Z [8145] INFO HTTP client/admin port: 127.0.0.1:8529
2012-05-13T12:37:08Z [8145] INFO Have Fun!

View File

@ -0,0 +1,8 @@
> ./arangod --console --log error /tmp/vocbase
ArangoDB shell [V8 version 3.9.4, DB version 0.5.0]
arango> 1 + 2;
3
arango> db.geo.count();
703

View File

@ -1,8 +0,0 @@
> ./arango --shell --log error /tmp/vocbase
ArangoDB shell [V8 version 3.6.5.1, DB version 1 (9650)]
arango> 1 + 2;
3
arango> db.geo.count();
703

View File

@ -0,0 +1,10 @@
arango> edges.relation.edges("86294/1593622");
[
{
"_id" : "1659158/3100950",
"_rev" : 3100950,
"_from" : "86294/1528086",
"_to" : "86294/1593622",
"label" : "knows"
}
]

View File

@ -0,0 +1,13 @@
arango> edges.relation.inEdges("86294/1528086");
[ ]
arango> edges.relation.inEdges("86294/1593622");
[
{
"_id" : "1659158/3100950",
"_rev" : 3100950,
"_from" : "86294/1528086",
"_to" : "86294/1593622",
"label" :
"knows"
}
]

View File

@ -0,0 +1,13 @@
arango> edges.relation.outEdges("86294/1528086");
[
{
"_id" : "1659158/3100950",
"_rev" : 3100950,
"_from" : "86294/1528086",
"_to" : "86294/1593622",
"label" :
"knows"
}
]
arango> edges.relation.outEdges("86294/1593622");
[ ]

View File

@ -1,2 +0,0 @@
arango> edges.relation.edges("86294/1593622");
[{ "_id" : "1659158/3100950", "_rev" : 3100950, "_from" : "86294/1528086", "_to" : "86294/1593622", "label" : "knows" }]

View File

@ -1,4 +0,0 @@
arango> edges.relation.inEdges("86294/1528086");
[ ]
arango> edges.relation.inEdges("86294/1593622");
[{ "_id" : "1659158/3100950", "_rev" : 3100950, "_from" : "86294/1528086", "_to" : "86294/1593622", "label" : "knows" }]

View File

@ -1,4 +0,0 @@
arango> edges.relation.outEdges("86294/1528086");
[{ "_id" : "1659158/3100950", "_rev" : 3100950, "_from" : "86294/1528086", "_to" : "86294/1593622", "label" : "knows" }]
arango> edges.relation.outEdges("86294/1593622");
[ ]

View File

@ -46,6 +46,7 @@ DEBUG = False
################################################################################
r1 = re.compile(r'\\item \\doxyref{(.*)}{p.}{(.*)} *')
r2 = re.compile(r' *\\appendix *')
f = open(file_name, "r")
@ -67,7 +68,15 @@ for line in f:
titel = m.group(1)
inc = m.group(2)
print "\\chapter{%s}\\input{%s}" % (titel, inc)
print "\\chapter{%s}\\label{%s}\\input{%s}" % (titel, inc, inc)
continue
#endif
m = r2.match(line)
if m:
print "\\appendix"
#endif
#endif
#endfor

View File

@ -173,6 +173,9 @@ replDict["e_xmlonly"] = ""
replDict["s_latexonly"] = ""
replDict["e_latexonly"] = ""
replDict["s_nonbreakablespace"] = " "
replDict["e_nonbreakablespace"] = ""
################################################################################
#### @brief generate code for text value
################################################################################
@ -235,6 +238,8 @@ gencDict["htmlonly"] = False
gencDict["latexonly"] = False
gencDict["xmlonly"] = True
gencDict["nonbreakablespace"] = True
################################################################################
#### @brief table entry
################################################################################

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.4.2
PROJECT_NUMBER = 0.5.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -190,13 +190,13 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES += FUN{1}="<tt><b>\1</b></tt>"
ALIASES += FUN{2}="<tt><b>\1, \2</b></tt>"
ALIASES += FUN{3}="<tt><b>\1, \2, \3</b></tt>"
ALIASES += FUN{4}="<tt><b>\1, \2, \3, \4</b></tt>"
ALIASES += FUN{5}="<tt><b>\1, \2, \3, \4, \5</b></tt>"
ALIASES += FUN{6}="<tt><b>\1, \2, \3, \4, \5, \6</b></tt>"
ALIASES += FUN{7}="<tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt>"
ALIASES += FUN{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += FUN{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2</b></tt><hr>@endif"
ALIASES += FUN{3}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3</b></tt><hr>@endif"
ALIASES += FUN{4}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4</b></tt><hr>@endif"
ALIASES += FUN{5}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5</b></tt><hr>@endif"
ALIASES += FUN{6}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6</b></tt><hr>@endif"
ALIASES += FUN{7}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6, \7</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt><hr>@endif"
ALIASES += FA{1}="<em>\1</em>"
ALIASES += FN{1}="<tt>\1</tt>"
ALIASES += VAR{1}="<tt>\1</tt>"
@ -204,17 +204,21 @@ ALIASES += LIT{1}="<tt>\1</tt>"
ALIASES += CODE{1}="<tt>\1</tt>"
ALIASES += CODE{2}="<tt>\1, \2</tt>"
ALIASES += CODE{3}="<tt>\1, \2, \3</tt>"
ALIASES += CMDOPT{1}="<tt><b>\1</b></tt>"
ALIASES += CMDOPT{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += CA{1}="<em>\1</em>"
ALIASES += CO{1}="<tt>\1</tt>"
ALIASES += REST{1}="<tt><b>\1</b></tt>"
ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}@endlatexonly@verbinclude \1@latexonly\renewcommand{\examplecap}{}@endlatexonly"
ALIASES += VERSION="0.4.2"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="0.5.0"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"
ALIASES += EXTREF{2}="@if LATEX \2 (see @latexonly \url{\1}@endlatexonly)@else<a href="\1">\2</a>@endif"
ALIASES += INTREF{2}="@if LATEX \2@else@ref \1 \"\2\"@endif"
ALIASES += SPC="&nbsp;"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.4.2
PROJECT_NUMBER = 0.5.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -190,13 +190,13 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES += FUN{1}="<tt><b>\1</b></tt>"
ALIASES += FUN{2}="<tt><b>\1, \2</b></tt>"
ALIASES += FUN{3}="<tt><b>\1, \2, \3</b></tt>"
ALIASES += FUN{4}="<tt><b>\1, \2, \3, \4</b></tt>"
ALIASES += FUN{5}="<tt><b>\1, \2, \3, \4, \5</b></tt>"
ALIASES += FUN{6}="<tt><b>\1, \2, \3, \4, \5, \6</b></tt>"
ALIASES += FUN{7}="<tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt>"
ALIASES += FUN{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += FUN{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2</b></tt><hr>@endif"
ALIASES += FUN{3}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3</b></tt><hr>@endif"
ALIASES += FUN{4}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4</b></tt><hr>@endif"
ALIASES += FUN{5}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5</b></tt><hr>@endif"
ALIASES += FUN{6}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6</b></tt><hr>@endif"
ALIASES += FUN{7}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6, \7</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt><hr>@endif"
ALIASES += FA{1}="<em>\1</em>"
ALIASES += FN{1}="<tt>\1</tt>"
ALIASES += VAR{1}="<tt>\1</tt>"
@ -204,17 +204,21 @@ ALIASES += LIT{1}="<tt>\1</tt>"
ALIASES += CODE{1}="<tt>\1</tt>"
ALIASES += CODE{2}="<tt>\1, \2</tt>"
ALIASES += CODE{3}="<tt>\1, \2, \3</tt>"
ALIASES += CMDOPT{1}="<tt><b>\1</b></tt>"
ALIASES += CMDOPT{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += CA{1}="<em>\1</em>"
ALIASES += CO{1}="<tt>\1</tt>"
ALIASES += REST{1}="<tt><b>\1</b></tt>"
ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}@endlatexonly@verbinclude \1@latexonly\renewcommand{\examplecap}{}@endlatexonly"
ALIASES += VERSION="0.4.2"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="0.5.0"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"
ALIASES += EXTREF{2}="@if LATEX \2 (see @latexonly \url{\1}@endlatexonly)@else<a href="\1">\2</a>@endif"
ALIASES += INTREF{2}="@if LATEX \2@else@ref \1 \"\2\"@endif"
ALIASES += SPC="&nbsp;"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
@ -698,6 +702,7 @@ EXCLUDE_SYMBOLS =
# the \include command).
EXAMPLE_PATH = \
./Doxygen/Examples.Ahuacatl \
./Doxygen/Examples.ArangoDB \
./Doxygen/Examples.Durham \
./Doxygen/Examples.Fyn \

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.4.2
PROJECT_NUMBER = 0.5.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -190,13 +190,13 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES += FUN{1}="<tt><b>\1</b></tt>"
ALIASES += FUN{2}="<tt><b>\1, \2</b></tt>"
ALIASES += FUN{3}="<tt><b>\1, \2, \3</b></tt>"
ALIASES += FUN{4}="<tt><b>\1, \2, \3, \4</b></tt>"
ALIASES += FUN{5}="<tt><b>\1, \2, \3, \4, \5</b></tt>"
ALIASES += FUN{6}="<tt><b>\1, \2, \3, \4, \5, \6</b></tt>"
ALIASES += FUN{7}="<tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt>"
ALIASES += FUN{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += FUN{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2</b></tt><hr>@endif"
ALIASES += FUN{3}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3</b></tt><hr>@endif"
ALIASES += FUN{4}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4</b></tt><hr>@endif"
ALIASES += FUN{5}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5</b></tt><hr>@endif"
ALIASES += FUN{6}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6</b></tt><hr>@endif"
ALIASES += FUN{7}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6, \7</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt><hr>@endif"
ALIASES += FA{1}="<em>\1</em>"
ALIASES += FN{1}="<tt>\1</tt>"
ALIASES += VAR{1}="<tt>\1</tt>"
@ -204,17 +204,21 @@ ALIASES += LIT{1}="<tt>\1</tt>"
ALIASES += CODE{1}="<tt>\1</tt>"
ALIASES += CODE{2}="<tt>\1, \2</tt>"
ALIASES += CODE{3}="<tt>\1, \2, \3</tt>"
ALIASES += CMDOPT{1}="<tt><b>\1</b></tt>"
ALIASES += CMDOPT{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += CA{1}="<em>\1</em>"
ALIASES += CO{1}="<tt>\1</tt>"
ALIASES += REST{1}="<tt><b>\1</b></tt>"
ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}@endlatexonly@verbinclude \1@latexonly\renewcommand{\examplecap}{}@endlatexonly"
ALIASES += VERSION="0.4.2"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="0.5.0"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"
ALIASES += EXTREF{2}="@if LATEX \2 (see @latexonly \url{\1}@endlatexonly)@else<a href="\1">\2</a>@endif"
ALIASES += INTREF{2}="@if LATEX \2@else@ref \1 \"\2\"@endif"
ALIASES += SPC="&nbsp;"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.4.2
PROJECT_NUMBER = 0.5.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -190,13 +190,13 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES += FUN{1}="<tt><b>\1</b></tt>"
ALIASES += FUN{2}="<tt><b>\1, \2</b></tt>"
ALIASES += FUN{3}="<tt><b>\1, \2, \3</b></tt>"
ALIASES += FUN{4}="<tt><b>\1, \2, \3, \4</b></tt>"
ALIASES += FUN{5}="<tt><b>\1, \2, \3, \4, \5</b></tt>"
ALIASES += FUN{6}="<tt><b>\1, \2, \3, \4, \5, \6</b></tt>"
ALIASES += FUN{7}="<tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt>"
ALIASES += FUN{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += FUN{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2</b></tt><hr>@endif"
ALIASES += FUN{3}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3</b></tt><hr>@endif"
ALIASES += FUN{4}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4</b></tt><hr>@endif"
ALIASES += FUN{5}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5</b></tt><hr>@endif"
ALIASES += FUN{6}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6</b></tt><hr>@endif"
ALIASES += FUN{7}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6, \7</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt><hr>@endif"
ALIASES += FA{1}="<em>\1</em>"
ALIASES += FN{1}="<tt>\1</tt>"
ALIASES += VAR{1}="<tt>\1</tt>"
@ -204,17 +204,21 @@ ALIASES += LIT{1}="<tt>\1</tt>"
ALIASES += CODE{1}="<tt>\1</tt>"
ALIASES += CODE{2}="<tt>\1, \2</tt>"
ALIASES += CODE{3}="<tt>\1, \2, \3</tt>"
ALIASES += CMDOPT{1}="<tt><b>\1</b></tt>"
ALIASES += CMDOPT{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += CA{1}="<em>\1</em>"
ALIASES += CO{1}="<tt>\1</tt>"
ALIASES += REST{1}="<tt><b>\1</b></tt>"
ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}@endlatexonly@verbinclude \1@latexonly\renewcommand{\examplecap}{}@endlatexonly"
ALIASES += VERSION="0.4.2"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="0.5.0"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"
ALIASES += EXTREF{2}="@if LATEX \2 (see @latexonly \url{\1}@endlatexonly)@else<a href="\1">\2</a>@endif"
ALIASES += INTREF{2}="@if LATEX \2@else@ref \1 \"\2\"@endif"
ALIASES += SPC="&nbsp;"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.

View File

@ -190,13 +190,13 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES += FUN{1}="<tt><b>\1</b></tt>"
ALIASES += FUN{2}="<tt><b>\1, \2</b></tt>"
ALIASES += FUN{3}="<tt><b>\1, \2, \3</b></tt>"
ALIASES += FUN{4}="<tt><b>\1, \2, \3, \4</b></tt>"
ALIASES += FUN{5}="<tt><b>\1, \2, \3, \4, \5</b></tt>"
ALIASES += FUN{6}="<tt><b>\1, \2, \3, \4, \5, \6</b></tt>"
ALIASES += FUN{7}="<tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt>"
ALIASES += FUN{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += FUN{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2</b></tt><hr>@endif"
ALIASES += FUN{3}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3</b></tt><hr>@endif"
ALIASES += FUN{4}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4</b></tt><hr>@endif"
ALIASES += FUN{5}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5</b></tt><hr>@endif"
ALIASES += FUN{6}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6</b></tt><hr>@endif"
ALIASES += FUN{7}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1, \2, \3, \4, \5, \6, \7</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1, \2, \3, \4, \5, \6, \7</b></tt><hr>@endif"
ALIASES += FA{1}="<em>\1</em>"
ALIASES += FN{1}="<tt>\1</tt>"
ALIASES += VAR{1}="<tt>\1</tt>"
@ -204,17 +204,21 @@ ALIASES += LIT{1}="<tt>\1</tt>"
ALIASES += CODE{1}="<tt>\1</tt>"
ALIASES += CODE{2}="<tt>\1, \2</tt>"
ALIASES += CODE{3}="<tt>\1, \2, \3</tt>"
ALIASES += CMDOPT{1}="<tt><b>\1</b></tt>"
ALIASES += CMDOPT{1}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{\parbox{\textwidth}{@endlatexonly<tt>\1</tt>@latexonly}}\vskip 0.7em@endlatexonly@else<hr><tt><b>\1</b></tt><hr>@endif"
ALIASES += CA{1}="<em>\1</em>"
ALIASES += CO{1}="<tt>\1</tt>"
ALIASES += REST{1}="<tt><b>\1</b></tt>"
ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}@endlatexonly@verbinclude \1@latexonly\renewcommand{\examplecap}{}@endlatexonly"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="@PACKAGE_VERSION@"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"
ALIASES += EXTREF{2}="@if LATEX \2 (see @latexonly \url{\1}@endlatexonly)@else<a href="\1">\2</a>@endif"
ALIASES += INTREF{2}="@if LATEX \2@else@ref \1 \"\2\"@endif"
ALIASES += SPC="&nbsp;"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.

View File

@ -13,20 +13,29 @@
\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
\usepackage[hyphens]{url}
\usepackage{doxygen}
\usepackage{listings}
\usepackage{ifthen}
\lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=8,numbers=left }
\makeindex
\setcounter{tocdepth}{3}
\let\DoxyVerbInclude=\undefined
\renewcommand{\footrulewidth}{0.4pt}
\newboolean{hascap}
\newcommand{\examplecap}{}
\setboolean{hascap}{false}
\newcommand{\examplesize}{\ttfamily}
\lstnewenvironment{DoxyVerbInclude}{%
\lstset{numbers=none,frame=single,backgroundcolor=\color{lightgray},language=,basicstyle=\ttfamily,breaklines=true,breakatwhitespace=false,caption=\protect\examplecap,captionpos=below}
\ifhascap%
\lstset{basicstyle=\protect\examplesize,caption=\protect\examplecap,numbers=none,backgroundcolor=\color{lightgray},language=,breaklines=true,breakatwhitespace=false,captionpos=below}%
\else%
\lstset{basicstyle=\protect\examplesize,numbers=none,backgroundcolor=\color{lightgray},language=,breaklines=true,breakatwhitespace=false,captionpos=below}%
\fi%
}{%
}
\definecolor{gray}{gray}{.8}
\definecolor{lightgray}{gray}{.98}
\definecolor{gray}{gray}{.9}
\definecolor{lightgray}{gray}{.95}
\setlength{\headheight}{15pt}
\begin{document}
\begin{titlepage}

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -1,6 +1,6 @@
\input{header.tex}
\begin{center}
{\Large ArangoDB User Manual }\\
{\Large ArangoDB's User Manual }\\
\vspace*{1cm}
{\large The ArangoDB Team}\\
\vspace*{0.5cm}
@ -13,6 +13,6 @@
\tableofcontents
\clearemptydoublepage
\pagenumbering{arabic}
\input{UserManualServer.inc}
\input{UserManual.inc}
\printindex
\end{document}

View File

@ -344,7 +344,7 @@ static void RunShell (mrb_state* mrb) {
console->open(! NoAutoComplete);
while (true) {
char* input = console->prompt("avocirb> ");
char* input = console->prompt("arangoirb> ");
if (input == 0) {
break;
@ -436,7 +436,7 @@ int main (int argc, char* argv[]) {
}
printf("\n");
printf("Welcome to avocirb %s. Copyright (c) 2012 triAGENS GmbH.\n", TRIAGENS_VERSION);
printf("Welcome to arangoirb %s. Copyright (c) 2012 triAGENS GmbH.\n", TRIAGENS_VERSION);
#ifdef TRI_V8_VERSION
printf("Using MRUBY %s engine. Copyright (c) 2012 mruby developers.\n", TRI_MRUBY_VERSION);

View File

@ -85,8 +85,8 @@ latex: Doxygen/arango-latex.doxy $(DOXYGEN)
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/InstallManual.tex > Doxygen/latex/InstallManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode install-manual.tex || true
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/UserManualServer.tex > Doxygen/latex/UserManualServer.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode user-manual-server.tex || true
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/UserManual.tex > Doxygen/latex/UserManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode user-manual.tex || true
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/ImplementorManual.tex > Doxygen/latex/ImplementorManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode implementor-manual.tex || true

View File

@ -390,8 +390,6 @@ WIKI = \
ShellEdge \
ShellIndex \
SimpleQueries \
UserManualServer \
UserManualServerBasics \
UserManualShell \
UserManualShellStartStop \
UserManual \
UserManualBasics \
jsUnity

View File

@ -984,10 +984,8 @@ WIKI = \
ShellEdge \
ShellIndex \
SimpleQueries \
UserManualServer \
UserManualServerBasics \
UserManualShell \
UserManualShellStartStop \
UserManual \
UserManualBasics \
jsUnity
FORCE = 0
@ -1034,7 +1032,9 @@ SHELL_COMMON = @srcdir@/js/common/tests/shell-document.js \
@srcdir@/js/common/tests/shell-simple-query.js \
@srcdir@/js/common/tests/shell-index.js \
@srcdir@/js/common/tests/shell-index-geo.js \
@srcdir@/js/common/tests/shell-cap-constraint.js
@srcdir@/js/common/tests/shell-cap-constraint.js \
@srcdir@/js/common/tests/shell-unique-constraint.js \
@srcdir@/js/common/tests/shell-hash-index.js
SHELL_SERVER = $(SHELL_COMMON)
UNITTESTS_SERVER = $(addprefix --unit-tests ,$(SHELL_SERVER))
@ -2944,8 +2944,8 @@ latex: Doxygen/arango-latex.doxy $(DOXYGEN)
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/InstallManual.tex > Doxygen/latex/InstallManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode install-manual.tex || true
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/UserManualServer.tex > Doxygen/latex/UserManualServer.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode user-manual-server.tex || true
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/UserManual.tex > Doxygen/latex/UserManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode user-manual.tex || true
python @top_srcdir@/Doxygen/Scripts/tex2tex.py Doxygen/latex/ImplementorManual.tex > Doxygen/latex/ImplementorManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode implementor-manual.tex || true

View File

@ -21,5 +21,5 @@ publish-html:
publish-pdf:
scp Doxygen/latex/install-manual.pdf $(MANUAL_DST)
scp Doxygen/latex/user-manual-server.pdf $(MANUAL_DST)
scp Doxygen/latex/user-manual.pdf $(MANUAL_DST)
scp Doxygen/latex/implementor-manual.pdf $(MANUAL_DST)

View File

@ -146,7 +146,9 @@ SHELL_COMMON = @srcdir@/js/common/tests/shell-document.js \
@srcdir@/js/common/tests/shell-simple-query.js \
@srcdir@/js/common/tests/shell-index.js \
@srcdir@/js/common/tests/shell-index-geo.js \
@srcdir@/js/common/tests/shell-cap-constraint.js
@srcdir@/js/common/tests/shell-cap-constraint.js \
@srcdir@/js/common/tests/shell-unique-constraint.js \
@srcdir@/js/common/tests/shell-hash-index.js
SHELL_SERVER = $(SHELL_COMMON)

View File

@ -1,7 +1,7 @@
# ArangoDB
We recently started a new open source project a nosql database
called ArangoDB which became ArangoDB in May 2012. ArangoDB is
We recently started a new open source project - a nosql database
called AvocadoDB which became ArangoDB in May 2012. ArangoDB is
currently pre-alpha. We want to have a version 1 ready by end of May
2012, a multi server version is planned for the third quarter of
2012. For details see the roadmap.
@ -11,8 +11,8 @@ Key features include:
* Schema-free schemata let you combine the space efficiency of MySQL with the performance power of NoSQL
* Use ArangoDB as an application server and fuse your application 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
* 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 n-gram search
* Configurable durability: let the application decide if it needs more durability or more performance
* No-nonsense storage: ArangoDB uses all of the power of modern storage hardware, like SSD and large caches
@ -21,7 +21,7 @@ Key features include:
For more in-depth information
* read more on the [design goals of ArangoDB](http://www.arangodb.org/2012/03/07/arangodbs-design-objectives)
* [watch the video](http://vimeo.com/36411892) Martin Schoenert, architect of ArangoDB, gives an introduction of what the ArangoDB project is about.
* [watch the video](http://vimeo.com/36411892) - Martin Schoenert, architect of ArangoDB, gives an introduction of what the ArangoDB project is about.
* or give it a try.
## Compilation

View File

@ -858,7 +858,7 @@ int ArangoServer::executeShell (bool tests) {
while(! v8::V8::IdleNotification()) {
}
char* input = console->prompt("arango> ");
char* input = console->prompt("arangod> ");
if (input == 0) {
printf("<ctrl-D>\nBye Bye! Auf Wiedersehen! さようなら\n");

View File

@ -230,9 +230,9 @@ namespace triagens {
///
/// @CMDOPT{--server.http-port @CA{address}:@CA{port}}
///
/// Specifies the @CA{port} for HTTP requests by clients. This will bind to the
/// given @CA{address}, which can be a numeric value like @CODE{192.168.1.1} or
/// a name.
/// Specifies the @CA{address} and @CA{port} for HTTP requests by clients. This
/// will bind to the given @CA{address}, which can be a numeric value like
/// @CODE{192.168.1.1} or a name.
///
/// @CMDOPT{--port @CA{port}}
///

View File

@ -25,10 +25,55 @@
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page AqlTOC
///
/// <ul>
/// <li>@ref Aql
/// <ul>
/// <li>@ref AqlPurpose
/// </li>
/// <li>@ref AqlBasics
/// <ul>
/// <li>@ref AqlWhitespace</li>
/// <li>@ref AqlKeywords</li>
/// <li>@ref AqlNames</li>
/// <li>@ref AqlTypes</li>
/// <li>@ref AqlParameter</li>
/// <li>@ref AqlTypeOrder</li>
/// <li>@ref AqlData</li>
/// <li>@ref AqlOperators</li>
/// <li>@ref AqlFunctions</li>
/// </ul>
/// </li>
/// <li>@ref AqlOperations
/// <ul>
/// <li>@ref AqlOperationFor</li>
/// <li>@ref AqlOperationReturn</li>
/// <li>@ref AqlOperationFilter</li>
/// <li>@ref AqlOperationSort</li>
/// <li>@ref AqlOperationLimit</li>
/// <li>@ref AqlOperationLet</li>
/// <li>@ref AqlOperationCollect</li>
/// </ul>
/// </li>
/// <li>@ref AqlAdvanced
/// <ul>
/// <li>@ref AqlSubqueries</li>
/// <li>@ref AqlExpansion</li>
/// </ul>
/// </li>
/// </ul>
/// </li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page Aql ArangoDB Query Language (AQL)
///
/// @section AqlPurpose Purpose
/// @EMBEDTOC{AqlTOC}
///
/// @section AqlPurpose Introduction
///
/// The ArangoDB query language (AQL) can be used to retrieve data that is
/// stored in ArangoDB. The general workflow when executing a query is as follows:
@ -62,7 +107,7 @@
/// However, for the parser any whitespace (spaces, carriage returns, line
/// feeds, and tab stops) does not have any special meaning except that it
/// separates individual tokens in the query. Whitespace within strings or
/// names must be enclosed in quotes in order to be preseved.
/// names must be enclosed in quotes in order to be preserved.
///
/// @subsection AqlKeywords Keywords
///
@ -80,7 +125,8 @@
/// of multiple of the above operations.
///
/// An example AQL query might look like this:
/// @verbinclude aqlqueryintro
///
/// @EXAMPLE{aqlqueryintro,find all active newbies}
///
/// In this example query, the terms @LIT{FOR}, @LIT{FILTER}, and @LIT{RETURN}
/// initiate the higher-level operation according to their name. These terms
@ -101,6 +147,7 @@
///
/// In addition to the higher-level operations keywords, there are other keywords.
/// The current list of keywords is:
///
/// - FOR
/// - RETURN
/// - FILTER
@ -131,7 +178,7 @@
/// backticks allows using otherwise-reserved keywords as names. An example
/// for this is:
///
/// @verbinclude aqlnamebackticks
/// @EXAMPLE{aqlnamebackticks,quoting keywords}
///
/// Due to the backticks, @LIT{filter} and @LIT{sort} are interpreted as names
/// and not as keywords here.
@ -155,7 +202,7 @@
/// To avoid any ambiguity, it is not allowed to refer to an unqualified
/// attribute name.
///
/// @verbinclude aqlattributenamesvalid
/// @EXAMPLE{aqlattributenamesvalid,active user with active friends}
///
/// In the above example, the attribute names @LIT{active}, @LIT{name},
/// @LIT{id}, and @LIT{userId} are qualified using the collection names
@ -168,7 +215,7 @@
/// within the context of the query. Variable names must be different from
/// the names of any collection name used in the same query.
///
/// @verbinclude aqlvariablenames
/// @EXAMPLE{aqlvariablenames,variable assignment}
///
/// In the above query, @LIT{users} is a collection name, and both @LIT{u}
/// and @LIT{friends} are variable names. This is because the @LIT{FOR} and
@ -185,6 +232,7 @@
///
/// AQL supports both primitive and compound data types. The following types are
/// available:
///
/// - primitive types: consisting of exactly one value
/// - null: an empty value, also: the absence of a value
/// - bool: boolean truth value with possible values @LIT{false} and @LIT{true}
@ -223,6 +271,7 @@
/// @subsubsection AqlCompoundLists Lists
///
/// AQL supports two compound types:
///
/// - lists: a composition of unnamed values, each accessible by their positions
/// - documents: a composition of named values, each accessible by their names
///
@ -230,9 +279,9 @@
/// sequences of (unnamed/anonymous) values. Individual list elements can be
/// accessed by their positions. The order of elements in a list is important.
///
/// An @LIT{list-declaration} starts with the @LIT{[} symbol and ends
/// An @LIT{list-declaration} starts with the @LIT{[} symbol and ends
/// with the @LIT{]} symbol. A @LIT{list-declaration} contains zero or
/// many @LIT{expression}s, seperated from each other with the
/// many @LIT{expression}s, seperated from each other with the
/// @LIT{\,} symbol.
///
/// In the easiest case, a list is empty and thus looks like:
@ -285,7 +334,7 @@
/// parameter name. The bind parameter values need to be passed when the query
/// is executed, but not as part of the query text but in a separate data structure.
///
/// @verbinclude aqlbind
/// @EXAMPLE{aqlbind,using a bind variable}
///
/// @subsection AqlTypeOrder Type and value order
///
@ -380,7 +429,7 @@
/// @LIT{users} that have a value of @LIT{null} in the attribute @LIT{name}, plus
/// all documents from @LIT{users} that do not have the @LIT{name} attribute at all:
///
/// @verbinclude aqlnull
/// @EXAMPLE{aqlnull,all users without a name}
///
/// Furthermore, @LIT{null} is less than any other value (excluding @LIT{null}
/// itself). That means documents with non-existing attributes might be included
@ -392,7 +441,7 @@
/// also all documents from the collection that do not have the attribute @LIT{age}
/// at all.
///
/// @verbinclude aqlnull2
/// @EXAMPLE{aqlnull2,all users younger than 39}
///
/// This behavior should always be taken into account when writing queries.
///
@ -609,7 +658,7 @@
/// allowed, too. The current list element is made available for further processing
/// in the variable specified by @LIT{variable-name}.
///
/// @verbinclude aqlfor
/// @EXAMPLE{aqlfor,for loop}
///
/// This will iterate over all elements from the list @LIT{users} (note: this list
/// consists of all documents from the collection named "users" in this case) and
@ -625,13 +674,13 @@
///
/// Another example that uses a statically declared list of values to iterate over:
///
/// @verbinclude aqlforstatic
/// @EXAMPLE{aqlforstatic,for loop with static content}
///
/// Nesting of multiple @LIT{FOR} statements is allowed, too. When @LIT{FOR} statements
/// are nested, a cross product of the list elements returned by the individual @LIT{FOR}
/// statements will be created.
///
/// @verbinclude aqlfornested
/// @EXAMPLE{aqlfornested,nested for loop}
///
/// In this example, there are two list iterations: an outer iteration
/// over the list @LIT{users} plus an inner iteration over the list @LIT{locations}.
@ -677,7 +726,7 @@
/// further and not be part of the result. If the condition is true, the current element is
/// not skipped and can be further processed.
///
/// @verbinclude aqlfilter
/// @EXAMPLE{aqlfilter,all active user younger than 39}
///
/// In the above example, all list elements from @LIT{users} will be included that have an
/// attribute @LIT{active} with value @LIT{true} and that have an attribute @LIT{age} with a
@ -688,7 +737,7 @@
/// same block. If multiple @LIT{FILTER} statements are used, their results will be combined
/// with a logical and, meaning all filter conditions must be true to include an element.
///
/// @verbinclude aqlfiltermultiple
/// @EXAMPLE{aqlfiltermultiple,two filter criteria}
///
/// @subsection AqlOperationSort SORT
///
@ -707,7 +756,7 @@
/// Note: when iterating over collection-based lists, the order of documents is always
/// undefined unless an explicit sort order is defined using @LIT{SORT}.
///
/// @verbinclude aqlsort
/// @EXAMPLE{aqlsort,sort by name}
///
/// @subsection AqlOperationLimit LIMIT
///
@ -726,7 +775,7 @@
/// It must be 0 or greater. The @LIT{count} value specifies how many elements should be
/// at most included in the result.
///
/// @verbinclude aqllimit
/// @EXAMPLE{aqllimit,first five users}
///
/// @subsection AqlOperationLet LET
///
@ -739,7 +788,7 @@
/// @LIT{LET} statements are mostly used to declare complex computations and to avoid
/// repeated computations of the same value at multiple parts of a query.
///
/// @verbinclude aqllet
/// @EXAMPLE{aqllet,save result}
///
/// In the above example, the computation of the number of recommendations is factored
/// out using a @LIT{LET} statement, thus avoiding computing the value twice in the
@ -748,7 +797,7 @@
/// Another use case for @LIT{LET} is to declare a complex computation in a subquery,
/// making the whole query more readable.
///
/// @verbinclude aqllet2
/// @EXAMPLE{aqllet2,save sub-query}
///
/// @subsection AqlOperationCollect COLLECT
///
@ -767,7 +816,7 @@
/// a variable (specified by @LIT{groups}) that contains all elements that fell into
/// the group. Specifying the @LIT{INTO} clause is optional-
///
/// @verbinclude aqlcollect
/// @EXAMPLE{aqlcollect,find all user living in a city}
///
/// In the above example, the list of @LIT{users} will be grouped by the attribute
/// @LIT{city}. The result is a new list of documents, with one element per distinct

View File

@ -25,6 +25,126 @@
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineTOC
///
/// <ul>
/// <li>@ref CommandLine
/// <ul>
/// <li>@ref CommandLineGeneralOptions
/// <ul>
/// <li>@ref CommandLineHelp "help"</li>
/// <li>@ref CommandLineVersion "version"</li>
/// <li>@ref CommandLineConfiguration "configuration"</li>
/// <li>@ref CommandLineDaemon "daemon"</li>
/// <li>@ref CommandLineSupervisor "supervisor"</li>
/// <li>@ref CommandLineUid "uid"</li>
/// <li>@ref CommandLineGid "gid"</li>
/// <li>@ref CommandLinePidFile "pid-file"</li>
/// </ul>
/// </li>
/// <li>@ref CommandLineArango
/// <ul>
/// <li>@ref CommandLineArangoHttpPort "server.http-port"</li>
/// <li>@ref CommandLineArangoAdminPort "server.admin-port"</li>
/// <li>@ref CommandLineArangoDirectory "database.directory"</li>
/// <li>@ref CommandLineArangoMaximalJournalSize "database.maximal-journal-size"</li>
/// <li>@ref CommandLineArangoRemoveOnDrop "database.remove-on-drop"</li>
/// </ul>
/// </li>
/// <li>@ref CommandLineLoggingInc
/// @copydetails CommandLineLoggingTOC
/// </li>
/// <li>@ref CommandLineSchedulerInc
/// @copydetails CommandLineSchedulerTOC
/// </li>
/// <li>@ref CommandLineRandomInc
/// @copydetails CommandLineRandomTOC
/// </li>
/// </ul>
/// </li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLine Command-Line Options
///
/// @EMBEDTOC{CommandLineTOC}
///
/// @section CommandLineGeneralOptions General Options
//////////////////////////////////////////////////////
///
/// @anchor CommandLineHelp
/// @copydetails triagens::rest::ApplicationServerImpl::options
///
/// @anchor CommandLineVersion
/// @copydetails triagens::rest::ApplicationServerImpl::version
///
/// @anchor CommandLineConfiguration
/// @copydetails triagens::rest::ApplicationServerImpl::initFile
///
/// @anchor CommandLineDaemon
/// @CMDOPT{--daemon}
///
/// Runs the server as a daemon (as a background process). This parameter can
/// only be set if the pid (process id) file is specified. That is, unless a
/// value to the parameter pid-file is given, then the server will report an
/// error and exit.
///
/// @anchor CommandLineSupervisor
/// @CMDOPT{--supervisor}
///
/// Executes the server in supervisor mode. In the event that the server
/// unexpectedly terminates due to an internal error, the supervisor will
/// automatically restart the server. Setting this flag automatically implies
/// that the server will run as a daemon. Note that, as with the daemon flag,
/// this flag requires that the pid-file parameter will set.
///
/// @anchor CommandLineUid
/// @copydetails triagens::rest::ApplicationServerImpl::uid
///
/// @anchor CommandLineGid
/// @copydetails triagens::rest::ApplicationServerImpl::gid
///
/// @anchor CommandLinePidFile
/// @copydetails triagens::rest::AnyServer::_pidFile
///
/// @section CommandLineArango Command-Line Options for the ArangoDB
////////////////////////////////////////////////////////////////////
///
/// @anchor CommandLineArangoHttpPort
/// @copydetails triagens::arango::ArangoServer::_httpPort
///
/// @anchor CommandLineArangoAdminPort
/// @copydetails triagens::arango::ArangoServer::_adminPort
///
/// @anchor CommandLineArangoDirectory
/// @copydetails triagens::arango::ArangoServer::_databasePath
///
/// @anchor CommandLineArangoMaximalJournalSize
/// @copydetails triagens::arango::ArangoServer::_defaultMaximalSize
///
/// @anchor CommandLineArangoRemoveOnDrop
/// @copydetails triagens::arango::ArangoServer::_removeOnDrop
///
/// @section CommandLineSchedulerInc Command-Line Options for Communication
///////////////////////////////////////////////////////////////////////////
///
/// @copydetails CommandLineScheduler
///
/// @section CommandLineLoggingInc Command-Line Options for Logging
///////////////////////////////////////////////////////////////////
///
/// @copydetails CommandLineLogging
///
/// @section CommandLineRandomInc Command-Line Options for Random Numbers
/////////////////////////////////////////////////////////////////////////
///
/// @copydetails CommandLineRandom
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: c++
// mode: outline-minor

View File

@ -37,31 +37,41 @@
/// The ArangoDB consists of a server, a separate shell, which allows you to
/// administrate the server, and a set of client API for various languages.
///
/// @xmlonly The HTML version of the manual can be found <ulink url="/manuals">here</ulink>. @endxmlonly
/// @xmlonly The HTML and PDF versions of the manual can be found <ulink url="http://www.arangodb.org/manuals">here</ulink>. @endxmlonly
///
/// @warning
/// ArangoDB is currently pre-alpha. We want to have a version 1 ready by end
/// of May 2012, a multi server version is planned for the third quarter of
/// 2012. The document is far from complete. The most complete parts are
/// @ref RefManual "here".
/// 2012. The document is still far from complete. Please contact
/// <a href="http://www.arangodb.org/connect">us</a>, if you have any questions.
///
/// @section ArangoDBServer ArangoDB Server (Version @VERSION)
/// @section ArangoDBUserManual ArgangoDB's User Manuals (Version @VERSION)
///////////////////////////////////////////////////////////////////////////
///
/// <ul>
/// <li>@ref InstallManual (<a href="/manuals/install-manual.pdf">pdf</a>)</li>
/// <li>@ref UserManualServer (<a href="/manuals/user-manual-server.pdf">pdf</a>)</a></li>
/// <li>@ref ImplementorManual (<a href="/manuals/implementor-manual.pdf">pdf</a>)</li>
/// <li>@ref UserManual @ifnot XML @SPC(<a href="http://www.arangodb.org/manuals/user-manual.pdf">pdf</a>) @endif</li>
/// <li>@ref Glossary</li>
/// </ul>
///
/// @section ArangoDBAdminManual ArangoDB's Administrator Manuals (Version @VERSION)
////////////////////////////////////////////////////////////////////////////////////
///
/// <ul>
/// <li>@ref InstallManual @ifnot XML @SPC(<a href="http://www.arangodb.org/manuals/install-manual.pdf">pdf</a>) @endif</li>
/// <li>@ref Glossary</li>
/// </ul>
///
/// @section ArangoDBAPIManual ArangoDB's Developer Manuals (Version @VERSION)
//////////////////////////////////////////////////////////////////////////////
///
/// <ul>
/// <li>@ref ImplementorManual @ifnot XML @SPC(<a href="http://www.arangodb.org/manuals/implementor-manual.pdf">pdf</a>) @endif</li>
/// <li>@ref RefManual</li>
/// <li>@ref Glossary</li>
/// </ul>
///
/// @section ArangoDB ArangoDB Shell
///
/// <ul>
/// <li>@ref UserManualShell</li>
/// </ul>
///
/// @section HomeApi API
////////////////////////
///
/// @subsection HomeCLINQ C\# / LINQ
///
@ -86,14 +96,15 @@
/// https://groups.google.com/forum/#!forum/ashikawa
///
/// @section HomeStayInContact Stay in Contact
//////////////////////////////////////////////
///
/// Frank is twittering for the project on Twitter using <a
/// href="http://www.twitter.com/fceller">@@fceller</a>. We've also a
/// "generic" twitter account mainly for announcements called <a
/// href="http://www.twitter.com/fceller">@@fceller</a>. We've also a "generic"
/// twitter account mainly for announcements called <a
/// href="http://www.twitter.com/arangodb">@@arangodb</a>
///
/// You can also subscribe to a low traffic announcement list on the
/// <a href="http://www.arangodb.org/connect">connect page</a>.
/// You can also subscribe to a low traffic announcement list on the <a
/// href="http://www.arangodb.org/connect">connect page</a>.
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

View File

@ -123,140 +123,6 @@
/// @endif
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineSubTOC
///
/// <ul>
/// <li>@ref CommandLineArango</li>
/// <li>@ref CommandLineScheduler</li>
/// <li>@ref CommandLineLogging</li>
/// <li>@ref CommandLineRandom</li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineTOC
///
/// <ul>
/// <li>@ref CommandLineHelp "help"</li>
/// <li>@ref CommandLineVersion "version"</li>
/// <li>@ref CommandLineConfiguration "configuration"</li>
/// <li>@ref CommandLineDaemon "daemon"</li>
/// <li>@ref CommandLineSupervisor "supervisor"</li>
/// <li>@ref CommandLineUid "uid"</li>
/// <li>@ref CommandLineGid "gid"</li>
/// <li>@ref CommandLinePidFile "pid-file"</li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLine Command-Line Options
///
/// <hr>
/// @copydoc CommandLineTOC
/// <hr>
///
/// @section GeneralOptions General Options
///////////////////////////////////////////
///
/// @anchor CommandLineHelp
///////////////////////////
/// @copydetails triagens::rest::ApplicationServerImpl::options
/// <hr>
///
/// @anchor CommandLineVersion
//////////////////////////////
/// @copydetails triagens::rest::ApplicationServerImpl::version
/// <hr>
///
/// @anchor CommandLineConfiguration
////////////////////////////////////
/// @copydetails triagens::rest::ApplicationServerImpl::initFile
/// <hr>
///
/// @anchor CommandLineDaemon
/////////////////////////////
/// @CMDOPT{--daemon}
///
/// Runs the server as a daemon (as a background process). This parameter can
/// only be set if the pid (process id) file is specified. That is, unless a
/// value to the parameter pid-file is given, then the server will report an
/// error and exit.
///
/// <hr>
///
/// @anchor CommandLineSupervisor
/////////////////////////////////
/// @CMDOPT{--supervisor}
///
/// Executes the server in supervisor mode. In the event that the server
/// unexpectedly terminates due to an internal error, the supervisor will
/// automatically restart the server. Setting this flag automatically implies
/// that the server will run as a daemon. Note that, as with the daemon flag,
/// this flag requires that the pid-file parameter will set.
///
/// <hr>
///
/// @anchor CommandLineUid
//////////////////////////
/// @copydetails triagens::rest::ApplicationServerImpl::uid
/// <hr>
///
/// @anchor CommandLineGid
//////////////////////////
/// @copydetails triagens::rest::ApplicationServerImpl::gid
/// <hr>
///
/// @anchor CommandLinePidFile
//////////////////////////////
/// @copydetails triagens::rest::AnyServer::_pidFile
/// <hr>
///
/// Next steps:
///////////////
///
/// @copydetails CommandLineSubTOC
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineArangoTOC
///
/// <ul>
/// <li>@ref CommandLineArangoHttpPort "server.http-port"</li>
/// <li>@ref CommandLineArangoAdminPort "server.admin-port"</li>
/// <li>@ref CommandLineArangoDirectory "database.directory"</li>
/// <li>@ref CommandLineArangoMaximalJournalSize "database.maximal-journal-size"</li>
/// <li>@ref CommandLineArangoRemoveOnDrop "database.remove-on-drop"</li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page CommandLineArango Command-Line Options for the ArangoDB
///
/// <hr>
/// @copydoc CommandLineArangoTOC
/// <hr>
///
/// @anchor CommandLineArangoHttpPort
/// @copydetails triagens::arango::ArangoServer::_httpPort
/// <hr>
///
/// @anchor CommandLineArangoAdminPort
/// @copydetails triagens::arango::ArangoServer::_adminPort
/// <hr>
///
/// @anchor CommandLineArangoDirectory
/// @copydetails triagens::arango::ArangoServer::_databasePath
/// <hr>
///
/// @anchor CommandLineArangoMaximalJournalSize
/// @copydetails triagens::arango::ArangoServer::_defaultMaximalSize
/// <hr>
///
/// @anchor CommandLineArangoRemoveOnDrop
/// @copydetails triagens::arango::ArangoServer::_removeOnDrop
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page DBAdminTOC
///

View File

@ -28,51 +28,58 @@
////////////////////////////////////////////////////////////////////////////////
/// @page ShellCollectionTOC
///
/// <ol>
/// <li>@ref ShellCollectionIntro</li>
/// <li>@ref ShellCollectionResource</li>
/// <li>@ref ShellCollectionShell
/// @copydetails ShellCollectionCallsTOC
/// <ul>
/// <li>@ref ShellCollection
/// <ul>
/// <li>@ref ShellCollectionIntro</li>
/// <li>@ref ShellCollectionResource</li>
/// <li>@ref ShellCollectionShell
/// @copydetails ShellCollectionCallsTOC
/// </li>
/// </ul>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page ShellCollectionCallsTOC
///
/// <ol>
/// <ul>
/// <li>@ref ShellCollectionCollectionMethods
/// <ol>
/// <li>@ref ShellCollectionDrop "collection.drop()"</li>
/// <li>@ref ShellCollectionTruncate "collection.truncate()"</li>
/// <li>@ref ShellCollectionProperties "collection.properties()"</li>
/// <li>@ref ShellCollectionFigures "collection.figures()"</li>
/// <li>@ref ShellCollectionLoad "collection.load()"</li>
/// <li>@ref ShellCollectionUnload "collection.unload()"</li>
/// <li>@ref ShellCollectionUnload "collection.rename(new-name)"</li>
/// </ol>
/// <ul>
/// <li>@ref ShellCollectionDrop "collection.drop"</li>
/// <li>@ref ShellCollectionTruncate "collection.truncate"</li>
/// <li>@ref ShellCollectionProperties "collection.properties"</li>
/// <li>@ref ShellCollectionFigures "collection.figures"</li>
/// <li>@ref ShellCollectionLoad "collection.load"</li>
/// <li>@ref ShellCollectionUnload "collection.unload"</li>
/// <li>@ref ShellCollectionUnload "collection.rename"</li>
/// </ul>
/// </li>
/// <li>@ref ShellCollectionDatabaseMethods
/// <ol>
/// <li>@ref ShellCollectionRead "db._collection(collection-identifier)"</li>
/// <li>@ref ShellCollectionCreate "db._create(collection-name, properties)"</li>
/// <li>@ref ShellCollectionReadAll "db._collections()"</li>
/// <ul>
/// <li>@ref ShellCollectionRead "db._collection"</li>
/// <li>@ref ShellCollectionCreate "db._create"</li>
/// <li>@ref ShellCollectionReadAll "db._collections"</li>
/// <li>@ref ShellCollectionReadShortCut "db.collection-name"</li>
/// <li>@ref ShellCollectionDropDb "db._drop(collection)"</li>
/// <li>@ref ShellCollectionTruncateDb "db._truncate(collection)"</li>
/// </ol>
/// <li>@ref ShellCollectionDropDb "db._drop"</li>
/// <li>@ref ShellCollectionTruncateDb "db._truncate"</li>
/// </ul>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page ShellCollection ArangoDB Interface for Collections
/// @page ShellCollection Handling Collections
///
/// This is an introduction to ArangoDB's interface for collections.
/// This is an introduction to ArangoDB's interface for collections and how
/// handle collections from the JavaScript shell @LIT{arangosh}. For other
/// languages see the corresponding language API.
///
/// <hr>
/// @copydoc ShellCollectionTOC
/// <hr>
/// The most import call is the call to create a new collection, see
/// @ref ShellCollectionCreate "_create".
///
/// @EMBEDTOC{ShellCollectionTOC}
///
/// @section ShellCollectionIntro Collections
/////////////////////////////////////////////
@ -87,10 +94,9 @@
////////////////////////////////////////////////////////////
///
/// All collections in ArangoDB have an unique identifier. This collection
/// identifier identifies a collection and is managed by
/// ArangoDB. Each collection, in addition, has a unique name. This
/// name is managed by the user. The interface allows you to access
/// the collections as:
/// identifier identifies a collection and is managed by ArangoDB. Each
/// collection, in addition, has a unique name. This name is managed by the
/// user. The interface allows you to access the collections as:
///
/// @LIT{db._collection(@FA{collection-identifier})}
///
@ -98,9 +104,11 @@
///
/// @LIT{db._collection(@FA{collection-name})}
///
/// For example: Assume that the collection identifier is
/// @LIT{7254820} and the name is @LIT{demo}, then the collection can
/// be accessed as:
/// A collection is created by a @FN{db._create} call, see @ref
/// ShellCollectionCreate "_create".
///
/// For example: Assume that the collection identifier is @LIT{7254820} and the
/// name is @LIT{demo}, then the collection can be accessed as:
///
/// @LIT{db._collection("demo")}
///
@ -127,54 +135,42 @@
///
/// @anchor ShellCollectionDrop
/// @copydetails JS_DropVocbaseCol
/// <hr>
///
/// @anchor ShellCollectionTruncate
/// @copydetails JSF_ArangoCollection_prototype_truncate
/// <hr>
///
/// @anchor ShellCollectionProperties
/// @copydetails JS_PropertiesVocbaseCol
/// <hr>
///
/// @anchor ShellCollectionFigures
/// @copydetails JS_FiguresVocbaseCol
/// <hr>
///
/// @anchor ShellCollectionLoad
/// @copydetails JS_LoadVocbaseCol
/// <hr>
///
/// @anchor ShellCollectionUnload
/// @copydetails JS_UnloadVocbaseCol
/// <hr>
///
/// @anchor ShellCollectionRename
/// @copydetails JS_RenameVocbaseCol
/// <hr>
///
/// @subsection ShellCollectionDatabaseMethods Database Methods
///////////////////////////////////////////////////////////////
///
/// @anchor ShellCollectionRead
/// @copydetails JS_CollectionVocBase
/// <hr>
///
/// @anchor ShellCollectionCreate
/// @copydetails JS_CreateVocBase
/// <hr>
///
/// @anchor ShellCollectionReadAll
/// @copydetails JS_CollectionsVocBase
/// <hr>
///
/// @anchor ShellCollectionReadShortCut
/// @copydetails MapGetVocBase
/// <hr>
///
/// @anchor ShellCollectionDropDb
/// @copydetails JSF_ArangoDatabase_prototype__drop
/// <hr>
///
/// @anchor ShellCollectionTruncateDb
/// @copydetails JSF_ArangoDatabase_prototype__truncate

View File

@ -28,45 +28,49 @@
////////////////////////////////////////////////////////////////////////////////
/// @page ShellDocumentTOC
///
/// <ol>
/// <li>@ref ShellDocumentIntro</li>
/// <li>@ref ShellDocumentResource</li>
/// <li>@ref ShellDocumentShell
/// @copydetails ShellDocumentCallsTOC
/// <ul>
/// <li>@ref ShellDocument
/// <ul>
/// <li>@ref ShellDocumentIntro</li>
/// <li>@ref ShellDocumentResource</li>
/// <li>@ref ShellDocumentShell
/// @copydetails ShellDocumentCallsTOC
/// </li>
/// </ul>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page ShellDocumentCallsTOC
///
/// <ol>
/// <ul>
/// <li>@ref ShellDocumentCollectionMethods
/// <ol>
/// <li>@ref ShellDocumentRead "collection.document(document-handle)"</li>
/// <li>@ref ShellDocumentCreate "collection.save(data)"</li>
/// <li>@ref ShellDocumentUpdate "collection.replace(document, data)"</li>
/// <li>@ref ShellDocumentDelete "collection.remove(document)"</li>
/// </ol>
/// <ul>
/// <li>@ref ShellDocumentRead "collection.document"</li>
/// <li>@ref ShellDocumentCreate "collection.save"</li>
/// <li>@ref ShellDocumentUpdate "collection.replace"</li>
/// <li>@ref ShellDocumentDelete "collection.remove"</li>
/// </ul>
/// </li>
/// <li>@ref ShellDocumentDatabaseMethods
/// <ol>
/// <li>@ref ShellDocumentDbRead "db._document(document-handle)"</li>
/// <li>@ref ShellDocumentDbUpdate "db._replace(document-handle, data)"</li>
/// <li>@ref ShellDocumentDbDelete "db._remove(document-handle)"</li>
/// </ol>
/// <ul>
/// <li>@ref ShellDocumentDbRead "db._document"</li>
/// <li>@ref ShellDocumentDbUpdate "db._replace"</li>
/// <li>@ref ShellDocumentDbDelete "db._remove"</li>
/// </ul>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page ShellDocument ArangoDB Interface for Documents
/// @page ShellDocument Handling Documents
///
/// This is an introduction to ArangoDB's interface for documents.
/// This is an introduction to ArangoDB's interface for documents and how handle
/// documents from the JavaScript shell @LIT{arangosh}. For other languages see
/// the corresponding language API.
///
/// <hr>
/// @copydoc ShellDocumentTOC
/// <hr>
/// @EMBEDTOC{ShellDocumentTOC}
///
/// @section ShellDocumentIntro Documents, Identifiers, Handles
///////////////////////////////////////////////////////////////
@ -123,30 +127,24 @@
///
/// @anchor ShellDocumentRead
/// @copydetails JS_DocumentVocbaseCol
/// <hr>
///
/// @anchor ShellDocumentCreate
/// @copydetails JS_SaveVocbaseCol
/// <hr>
///
/// @anchor ShellDocumentUpdate
/// @copydetails JS_ReplaceVocbaseCol
/// <hr>
///
/// @anchor ShellDocumentDelete
/// @copydetails JS_RemoveVocbaseCol
/// <hr>
///
/// @subsection ShellDocumentDatabaseMethods Database Methods
/////////////////////////////////////////////////////////////
///
/// @anchor ShellDocumentDbRead
/// @copydetails JS_DocumentVocbase
/// <hr>
///
/// @anchor ShellDocumentDbUpdate
/// @copydetails JS_ReplaceVocbase
/// <hr>
///
/// @anchor ShellDocumentDbDelete
/// @copydetails JS_RemoveVocbase

View File

@ -28,33 +28,37 @@
////////////////////////////////////////////////////////////////////////////////
/// @page ShellEdgeTOC
///
/// <ol>
/// <li>@ref ShellEdgeIntro</li>
/// <li>@ref ShellEdgeShell
/// @copydetails ShellEdgeCallsTOC
/// <ul>
/// <li>@ref ShellEdge
/// <ul>
/// <li>@ref ShellEdgeIntro</li>
/// <li>@ref ShellEdgeShell
/// @copydetails ShellEdgeCallsTOC
/// </li>
/// </ul>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page ShellEdgeCallsTOC
///
/// <ol>
/// <li>@ref ShellEdgeCreate "edge-collection.save(from, to, data)"</li>
/// <li>@ref ShellEdgeEdges "edge-collection.edges(vertex)"</li>
/// <li>@ref ShellEdgeInEdges "edge-collection.inEdges(vertex)"</li>
/// <li>@ref ShellEdgeOutEdges "edge-collection.outEdges(vertex)"</li>
/// </ol>
/// <ul>
/// <li>@ref ShellEdgeCreate "edge-collection.save"</li>
/// <li>@ref ShellEdgeEdges "edge-collection.edges"</li>
/// <li>@ref ShellEdgeInEdges "edge-collection.inEdges"</li>
/// <li>@ref ShellEdgeOutEdges "edge-collection.outEdges"</li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page ShellEdge ArangoDB Interface for Edges
/// @page ShellEdge Handling Edges
///
/// This is an introduction to ArangoDB's interface for edges.
/// This is an introduction to ArangoDB's interface for edges and how handle
/// edges from the JavaScript shell @LIT{arangosh}. For other languages see the
/// corresponding language API.
///
/// <hr>
/// @copydoc ShellEdgeTOC
/// <hr>
/// @EMBEDTOC{ShellEdgeTOC}
///
/// @section ShellEdgeIntro Edges, Identifiers, Handles
///////////////////////////////////////////////////////
@ -68,20 +72,15 @@
///
/// @anchor ShellEdgeCreate
/// @copydetails JS_SaveEdgesCol
/// <hr>
///
/// @anchor ShellEdgeEdges
/// @copydetails JS_EdgesQuery
/// <hr>
///
/// @anchor ShellEdgeInEdges
/// @copydetails JS_InEdgesQuery
/// <hr>
///
/// @anchor ShellEdgeOutEdges
/// @copydetails JS_OutEdgesQuery
/// <hr>
///
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

View File

@ -28,84 +28,74 @@
////////////////////////////////////////////////////////////////////////////////
/// @page SimpleQueriesTOC
///
/// <ol>
/// <li>@ref SimpleQueriesQueries
/// <ol>
/// <li>@ref SimpleQueryDocument "collection.document(document-reference)"</li>
/// <li>@ref SimpleQueryAll "collection.all()"</li>
/// <li>@ref SimpleQueryByExample "collection.byExample(example)"</li>
/// <li>@ref SimpleQueryFirstExample "collection.firstExample(example)"</li>
/// <li>@ref SimpleQueryCollectionCount "collection.count()"</li>
/// <li>@ref SimpleQueryToArray "collection.toArray()"</li>
/// </ol>
/// <ul>
/// <li>@ref SimpleQueries
/// <ul>
/// <li>@ref SimpleQueriesQueries
/// <ul>
/// <li>@ref SimpleQueryAll "collection.all"</li>
/// <li>@ref SimpleQueryByExample "collection.byExample"</li>
/// <li>@ref SimpleQueryFirstExample "collection.firstExample"</li>
/// <li>@ref SimpleQueryCollectionCount "collection.count"</li>
/// <li>@ref SimpleQueryToArray "collection.toArray"</li>
/// </ul>
/// </li>
/// <li>@ref SimpleQueriesGeoQueries
/// <ul>
/// <li>@ref SimpleQueryNear "collection.near"</li>
/// <li>@ref SimpleQueryWithin "collection.within"</li>
/// <li>@ref SimpleQueryGeo "collection.geo"</li>
/// </ul>
/// </li>
/// <li>@ref SimpleQueriesPagination
/// <ul>
/// <li>@ref SimpleQueryLimit "query.limit"</li>
/// <li>@ref SimpleQuerySkip "query.skip"</li>
/// </ul>
/// </li>
/// <li>@ref SimpleQueriesCursor
/// <ul>
/// <li>@ref SimpleQueryHasNext "query.hasNext"</li>
/// <li>@ref SimpleQueryNext "query.next"</li>
/// <li>@ref SimpleQueryDispose "query.dispose"</li>
/// <li>@ref SimpleQueryCount "query.count"</li>
/// </ul>
/// </li>
/// </ul>
/// </li>
/// <li>@ref SimpleQueriesGeoQueries
/// <ol>
/// <li>@ref SimpleQueryNear "collection.near(latitude, longitude)"</li>
/// <li>@ref SimpleQueryWithin "collection.within(latitude, longitude)"</li>
/// <li>@ref SimpleQueryGeo "collection.geo(location)"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesEdgesQueries
/// <ol>
/// <li>@ref SimpleQueryEdges "edges-collection.edges(vertex)"</li>
/// <li>@ref SimpleQueryInEdges "edges-collection.inEdges(vertex)"</li>
/// <li>@ref SimpleQueryOutEdges "edges-collection.outEdges(vertex)"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesPagination
/// <ol>
/// <li>@ref SimpleQueryLimit "query.limit(limit)"</li>
/// <li>@ref SimpleQuerySkip "query.skip(skip)"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesSequentialAccess
/// <ol>
/// <li>@ref SimpleQueryHasNext "query.hasNext()"</li>
/// <li>@ref SimpleQueryNext "query.next()"</li>
/// <li>@ref SimpleQueryCount "query.count()"</li>
/// </ol>
/// </li>
/// </ol>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page SimpleQueries Simple Queries
///
/// Simple queries can be used if the query condition is straight forward
/// simple, i. e., a document reference, all documents, a query-by-example, or a
/// simple geo query. In a simple query you can specify exactly one collection
/// and one condition.
///
/// <hr>
/// @copydoc SimpleQueriesTOC
/// <hr>
/// Simple queries can be used if the query condition is straight forward,
/// i. e., a document reference, all documents, a query-by-example, or a simple
/// geo query. In a simple query you can specify exactly one collection and one
/// query criteria. In the following sections we describe the JavaScript shell
/// interface for simple queries, which you can use within the ArangoDB shell
/// and within actions and transactions. For other languages see the
/// corresponding language API documentation.
///
/// If a query returns a cursor, then you can use @FN{hasNext} and @FN{next} to
/// iterate over the result set or @FN{toArray} to convert it to an array.
///
/// @EMBEDTOC{ SimpleQueriesTOC}
///
/// @section SimpleQueriesQueries Queries
/////////////////////////////////////////
///
/// @anchor SimpleQueryDocument
/// @copydetails JS_DocumentVocbaseCol
/// <hr>
///
/// @anchor SimpleQueryAll
/// @copydetails JSF_ArangoCollection_prototype_all
/// <hr>
///
/// @anchor SimpleQueryByExample
/// @copydetails JSF_ArangoCollection_prototype_byExample
/// <hr>
///
/// @anchor SimpleQueryFirstExample
/// @copydetails JSF_ArangoCollection_prototype_firstExample
/// <hr>
///
/// @anchor SimpleQueryCollectionCount
/// @copydetails JS_CountVocbaseCol
/// <hr>
///
/// @anchor SimpleQueryToArray
/// @copydetails JSF_ArangoCollection_prototype_toArray
@ -113,49 +103,31 @@
/// @section SimpleQueriesGeoQueries Geo Queries
////////////////////////////////////////////////
///
/// The ArangoDB allows to selects documents based on geographic
/// coordinates. In order for this to work, a geo-spatial index must be defined.
/// This index will use a very elaborate algorithm to lookup neighbours that is
/// a magnitude faster than a simple R* index.
/// The ArangoDB allows to selects documents based on geographic coordinates. In
/// order for this to work, a geo-spatial index must be defined. This index
/// will use a very elaborate algorithm to lookup neighbors that is a magnitude
/// faster than a simple R* index.
///
/// In general a geo coordinate is a pair of latitude and longitude. This can
/// either be an list with two elements like @CODE{[ -10\, +30 ]} (latitude
/// first, followed by longitude) or an object like @CODE{{ lon: -10\, lat: +30
/// }}. In order to find all documents within a given radius around a
/// coordinate use the @FN{within} operator. In order to find all
/// documents near a given document use the @FN{near} operator.
/// either be an list with two elements like @CODE{[-10\, +30]} (latitude
/// first, followed by longitude) or an object like @CODE{{lon: -10\, lat: +30}}.
/// In order to find all documents within a given radius around a coordinate
/// use the @FN{within} operator. In order to find all documents near a given
/// document use the @FN{near} operator.
///
/// It is possible to define more than one geo-spatial index per collection. In
/// this case you must give a hint using the @FN{geo} operator which of indexes
/// should be used in a query.
///
/// <hr>
///
/// @anchor SimpleQueryNear
/// @copydetails JSF_ArangoCollection_prototype_near
/// <hr>
///
/// @anchor SimpleQueryWithin
/// @copydetails JSF_ArangoCollection_prototype_within
/// <hr>
///
/// @anchor SimpleQueryGeo
/// @copydetails JSF_ArangoCollection_prototype_geo
///
/// @section SimpleQueriesEdgesQueries Edges Queries
////////////////////////////////////////////////////
///
/// @anchor SimpleQueryEdges
/// @copydetails JS_EdgesQuery
/// <hr>
///
/// @anchor SimpleQueryInEdges
/// @copydetails JS_InEdgesQuery
/// <hr>
///
/// @anchor SimpleQueryOutEdges
/// @copydetails JS_OutEdgesQuery
///
/// @section SimpleQueriesPagination Pagination
///////////////////////////////////////////////
///
@ -174,21 +146,21 @@
///
/// @anchor SimpleQueryLimit
/// @copydetails JSF_SimpleQuery_prototype_limit
/// <hr>
///
/// @anchor SimpleQuerySkip
/// @copydetails JSF_SimpleQuery_prototype_skip
///
/// @section SimpleQueriesSequentialAccess Sequential Access
////////////////////////////////////////////////////////////
/// @section SimpleQueriesCursor Sequential Access and Cursors
//////////////////////////////////////////////////////////////
///
/// @anchor SimpleQueryHasNext
/// @copydetails JSF_SimpleQuery_prototype_hasNext
/// <hr>
///
/// @anchor SimpleQueryNext
/// @copydetails JSF_SimpleQuery_prototype_next
/// <hr>
///
/// @anchor SimpleQueryDispose
/// @copydetails JSF_SimpleQuery_prototype_dispose
///
/// @anchor SimpleQueryCount
/// @copydetails JSF_SimpleQuery_prototype_count

View File

@ -1,96 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief installation 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 UserManualShell ArangoDB Shell User Manual
///
/// <ol>
/// <li>@ref UserManualShellBasics
/// <ol>
/// <li>@ref UserManualShellStartStop
/// </li>
/// <li>@ref SimpleQueries
/// </li>
/// </ol>
/// </li>
/// </ol>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualShellBasics Basics
///
/// The ArangoDB consists of a server, which can be accessed by clients
/// using the appropriate client API. A simple JavaScript shell can be used
/// to administrate the server, when no HTTP access is possible or when
/// more complex administration tasks are required. This shell can also
/// be used to query documents for debugging.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualShellStartStopTOC
///
/// <ol>
/// <li>@ref UserManualShellStartStopShell
/// </li>
/// <li>@ref UserManualShellStartStopOptions
/// </li>
/// </ol>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualShellStartStop Starting the ArangoDB Shell
///
/// After starting the ArangoDB server, you can access the server
/// using the avocsh JavaScript shell.
///
/// <hr>
/// @copydoc UserManualShellStartStopTOC
/// <hr>
///
/// @section UserManualShellStartStopShell avocsh
///
/// After the server has been @ref UserManualServerStartStop "started",
/// you can use the ArangoDB shell to administrate the server. Without
/// any arguments, the ArangoDB shell will try to contact the server
/// on port 8529 on the localhost.
///
/// @verbinclude avocsh1
///
/// The shell will print its own version number and, if successfully connected
/// to a server, the version number of the ArangoDB server.
///
/// @section UserManualShellStartStopOptions Command-Line Options
///
/// Use @LIT{--help} to get a list of command-line options:
///
/// @verbinclude avocsh2
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
// End:

View File

@ -1,137 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
/// @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 UserManualServer ArangoDB's User Manual
///
/// @if LATEX
/// <ul>
/// <li>@ref UserManualServerBasics</li>
/// <li>ArangoQueryLanguage</li>
/// <li>@ref Glossary</li>
/// </ul>
/// @else
/// @copydetails UserManualServerBasicsTOC
/// <ul>
/// <li>Arango Query Language</li>
/// </ul>
/// @endif
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualServerBasicsTOC
///
/// <ul>
/// <li>@ref UserManualServerBasics
/// <ul>
/// <li>@ref UserManualServerStartStop
/// <ul>
/// <li>@ref UserManualServerStartStopHttp</li>
/// <li>@ref UserManualServerStartStopDebug</li>
/// <li>@ref UserManualServerStartStopOptions</li>
/// </ul>
/// </li>
/// </ul>
/// </li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualServerBasics Basics
///
/// The ArangoDB groups documents into collections. Each collection can be
/// accessed using queries. For simple queries involving just one collection,
/// you can use a simple interface from within JavaScript code, see ArangoDB
/// shell user manual. This interface allows you to select documents from one
/// collection based on simple search criteria. For more complex queries, you
/// can use the Arango Query Language, which is an evolution of SQL resp. UNQL.
///
/// @EMBEDTOC{UserManualServerBasicsTOC}
///
/// @section UserManualServerStartStop Starting the ArangoDB
/////////////////////////////////////////////////////////////
///
/// The ArangoDB has two modes of operation: as server, where it will answer to
/// client requests and an emergency console, where you can access the database
/// directly. The latter should - as the name suggests - only be used in case of
/// an emergency, for example, a corrupted collection. Using the emergency
/// console allows you to issue all commands normally available in actions and
/// transactions.
///
/// You should never start more than one server for the same database,
/// independent from the mode of operation.
///
/// @subsection UserManualServerStartStopHttp Starting the HTTP Server
//////////////////////////////////////////////////////////////////////
///
/// The following command starts the ArangoDB in server mode. You will be able
/// to access the server using HTTP request on port 8529. See below for a list
/// of frequently used options, see @ref CommandLine "here" for a complete list.
///
/// @verbinclude option-database-directory
///
/// @subsection UserManualServerStartStopDebug Starting the Emergency Console
/////////////////////////////////////////////////////////////////////////////
///
/// The following command starts a emergency console. See below for a list of
/// frequently used options, see @ref CommandLine "here" for a complete list.
///
/// @verbinclude start1
///
/// @subsection UserManualServerStartStopOptions Frequently Used Options
////////////////////////////////////////////////////////////////////////
///
/// The following command-line options are frequently used. For a full
/// list of options see @ref CommandLine "here".
///
/// @CMDOPT{@CA{database-directory}}
///
/// Uses the @CA{database-directory} as base directory. There is an alternative
/// version available for use in configuration files, see @ref
/// CommandLineArango "here".
///
/// @copydetails triagens::rest::ApplicationServerImpl::options
///
/// @CMDOPT{--log @CA{level}}
///
/// Allows the user to choose the level of information which is logged by the
/// server. The @CA{level} is specified as a string and can be one of the
/// following values: fatal, error, warning, info, debug, trace. For more
/// information see @ref CommandLineLogging "here".
///
/// @copydetails triagens::arango::ArangoServer::_httpPort
///
/// @CMDOPT{--shell}
///
/// Opens a debug shell instead of starting the HTTP server.
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: c++
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
// End:

256
RestServer/user-manual.dox Normal file
View File

@ -0,0 +1,256 @@
////////////////////////////////////////////////////////////////////////////////
/// @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 UserManual ArangoDB's User Manual
///
/// @if LATEX
/// <ul>
/// <li>@ref UserManualBasics</li>
/// <li>@ref ShellCollection</li>
/// <li>@ref ShellDocument</li>
/// <li>@ref ShellEdge</li>
/// <li>@ref SimpleQueries</li>
/// <li>@ref Aql</li>
///
/// @latexonly\appendix@endlatexonly
/// <li>@ref CommandLine</li>
/// <li>@ref Glossary</li>
/// </ul>
/// @else
/// @copydetails UserManualBasicsTOC
/// @copydetails ShellCollectionTOC
/// @copydetails ShellDocumentTOC
/// @copydetails ShellEdgeTOC
/// @copydetails SimpleQueriesTOC
/// @copydetails AqlTOC
/// @copydetails CommandLineTOC
/// @endif
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualBasicsTOC
///
/// <ul>
/// <li>@ref UserManualBasics
/// <ul>
/// <li>@ref UserManualServerStartStop
/// <ul>
/// <li>@ref UserManualServerStartStopOptions</li>
/// </ul>
/// </li>
/// <li>@ref UserManualServerFE</li>
/// <li>@ref UserManualShellStartStop
/// <ul>
/// <li>@ref UserManualShellStartStopOptions</li>
/// </ul>
/// </li>
/// </li>
/// <li>@ref UserManualServerStartStopDebug
/// </li>
/// </ul>
/// </li>
/// </ul>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualBasics About ArangoDB
///
/// We recently started a new open source project - a universal nosql database
/// called AvocadoDB which became ArangoDB in May 2012.
///
/// Key features include:
///
/// <ul>
/// <li> Schema-free schemata let you combine the space efficiency of MySQL with
/// the performance power of NoSQL</li>
/// <li> Use ArangoDB as an application server and fuse your application and
/// database together for maximal throughput</li>
/// <li> JavaScript for all: no language zoo, you can use one language from your
/// browser to your back-end</li>
/// <li> ArangoDB is multi-threaded - exploit the power of all your cores</li>
/// <li> Flexible data modeling: model your data as combination of key-value pairs,
/// documents or graphs - perfect for social relations</li>
/// <li> Free index choice: use the correct index for your problem, be it a skip
/// list or a n-gram search</li>
/// <li> Configurable durability: let the application decide if it needs more
/// durability or more performance</li>
/// <li> No-nonsense storage: ArangoDB uses all of the power of modern storage
/// hardware, like SSD and large caches</li>
/// <li> It is open source (Apache Licence 2.0)</li>
/// </ul>
///
/// For more in-depth information
///
/// <ul>
/// <li> read more on the@SPC@EXTREF{http://www.arangodb.org/2012/03/07/arangodbs-design-objectives,design goals of ArangoDB}</li>
/// <li> @EXTREF{http://vimeo.com/36411892,watch the video}@SPC- Martin Schoenert,
/// architect of ArangoDB, gives an introduction of what the ArangoDB project
/// is about.</li>
/// <li> or give it a@SPC@INTREF{InstallManual,try}.</li>
/// </ul>
///
/// The ArangoDB database groups documents into collections. Collections and
/// documents can be accessed using queries. For simple queries involving just
/// one collection and one search criteria, you can use a simple interface from
/// within JavaScript code or other languages supported by an API. This
/// interface allows you to select documents from one collection based on just
/// one search criteria. For more complex queries, you can use the Arango Query
/// Language (AQL), which is an evolution of SQL resp. UNQL for the NoSQL
/// world. AQL allows you to use more then one collection, similar to joins from
/// SQL, while still retaining the document and list structures like UNQL.
///
/// The ArangoDB database packages comes with various programs:
///
/// - @LIT{arangod}: The ArangoDB database daemon. This server program is
/// intended to run as daemon process and to server the various clients
/// connection to the server via TCP / HTTP. See @ref
/// UserManualServerStartStop.
/// - @LIT{arangosh}: The ArangoDB shell. A client that implements a
/// read-eval-print loop (REPL) and provides functions to access and
/// administrate the ArangoDB server. See @ref UserManualShellStartStop.
/// - @LIT{arangoimp}: A bulk importer for the ArangoDB server.
/// See @ref UserManualImporterStartStop.
///
/// @EMBEDTOC{UserManualBasicsTOC}
///
/// @section UserManualServerStartStop Starting the ArangoDB Server
///////////////////////////////////////////////////////////////////
///
/// The ArangoDB database server has two modes of operation: as server, where it
/// will answer to client requests and an emergency console, in which you can
/// access the database directly. The latter - as the name suggests - should
/// only be used in case of an emergency, for example, a corrupted
/// collection. Using the emergency console allows you to issue all commands
/// normally available in actions and transactions.
///
/// You should never start more than one server for the same database,
/// independent from the mode of operation.
///
/// The following command starts the ArangoDB database in server mode. You will
/// be able to access the server using HTTP requests on port 8529. See @ref
/// UserManualServerStartStopOptions "below" for a list of frequently used
/// options, see @ref CommandLine "here" for a complete list.
///
/// @TINYEXAMPLE{option-database-directory,starting the server}
///
/// After starting the server, point your favorite browser to:
///
/// @LIT{http://localhost:8529/}
///
/// to access the administration front-end.
///
/// @subsection UserManualServerStartStopOptions Frequently Used Options
////////////////////////////////////////////////////////////////////////
///
/// The following command-line options are frequently used. For a full
/// list of options see @ref CommandLine "here".
///
/// @CMDOPT{@CA{database-directory}}
////////////////////////////////////
///
/// Uses the @CA{database-directory} as base directory. There is an alternative
/// version available for use in configuration files, see @ref
/// CommandLineArango "here".
///
/// @copydetails triagens::rest::ApplicationServerImpl::options
///////////////////////////////////////////////////////////////
///
/// @CMDOPT{--log @CA{level}}
/////////////////////////////
///
/// Allows the user to choose the level of information which is logged by the
/// server. The @CA{level} is specified as a string and can be one of the
/// following values: fatal, error, warning, info, debug, trace. For more
/// information see @ref CommandLineLogging "here".
///
/// @copydetails triagens::arango::ArangoServer::_httpPort
//////////////////////////////////////////////////////////
///
/// @CMDOPT{--daemon}
/////////////////////
///
/// Runs the server as a daemon (as a background process).
///
/// @section UserManualServerFE ArangoDB's Front-End
////////////////////////////////////////////////////
///
/// The ArangoDB server has a graphical front-end, which allows you to inspect
/// the current state of the server. You can read the front-end using the
/// following URL:
///
/// @LIT{http://localhost:8529/_admin}
///
/// Unless you have loaded an application into the ArangoDB server, which remaps
/// the paths, the front-end will also be available under
///
/// @LIT{http://localhost:8529/}.
///
/// @htmlonly <img src="images/fe1.png" alt="ArangoDB Fron-End">@endhtmlonly
/// @latexonly\includegraphics[width=12cm]{images/fe1.png}@endlatexonly
///
/// The front-end allows you the browser through the collections and
/// documents. If you need to administrate the database, please use
/// the ArgangoDB shell described in the next section.
///
/// @section UserManualShellStartStop Starting the ArangoDB Shell
/////////////////////////////////////////////////////////////////
///
/// After the server has been @ref UserManualServerStartStop "started",
/// you can use the ArangoDB shell to administrate the server. Without
/// any arguments, the ArangoDB shell will try to contact the server
/// on port 8529 on the localhost.
///
/// @TINYEXAMPLE{arangosh-start,starting the shell}
///
/// The shell will print its own version number and, if successfully connected
/// to a server, the version number of the ArangoDB server.
///
/// @subsection UserManualShellStartStopOptions Command-Line Options
////////////////////////////////////////////////////////////////////
///
/// Use @LIT{--help} to get a list of command-line options:
///
/// @TINYEXAMPLE{arangosh-options,shell options}
///
/// @section UserManualServerStartStopDebug Starting the ArangoDB Emergency Console
///////////////////////////////////////////////////////////////////////////////////
///
/// The following command starts a emergency console. See below for a list of
/// frequently used options, see @ref CommandLine "here" for a complete list.
///
/// @note Never start the emergency console for a database which also has a
/// server attached to it. In general the ArangoDB shell is what you want.
///
/// @EXAMPLE{start-emergency-console,emergency console}
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: c++
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
// End:

View File

@ -150,7 +150,7 @@ static TRI_action_options_t ParseActionOptions (TRI_v8_global_t* v8g,
v8::Handle<v8::Object> options) {
TRI_action_options_t ao;
// check "parameter" field
// check "parameters" field
if (options->Has(v8g->ParametersKey)) {
v8::Handle<v8::Value> parameters = options->Get(v8g->ParametersKey);
@ -159,6 +159,14 @@ static TRI_action_options_t ParseActionOptions (TRI_v8_global_t* v8g,
}
}
// check the "prefix" field
if (options->Has(v8g->PrefixKey)) {
ao._prefix = TRI_ObjectToBoolean(options->Get(v8g->PrefixKey));
}
else {
ao._prefix = false;
}
// and return the result
return ao;
}
@ -179,7 +187,7 @@ static TRI_action_options_t ParseActionOptions (TRI_v8_global_t* v8g,
////////////////////////////////////////////////////////////////////////////////
/// @brief defines a new action
///
/// @FUN{defineSystemAction(@FA{name}, @FA{queue}, @FA{callback}, @FA{parameter})}
/// @FUN{defineAction(@FA{name}, @FA{queue}, @FA{callback}, @FA{parameter})}
///
/// Possible queues are:
/// - "CLIENT"
@ -206,10 +214,6 @@ static v8::Handle<v8::Value> JS_DefineAction (v8::Arguments const& argv) {
string name = *utf8name;
if (name.empty()) {
return scope.Close(v8::ThrowException(v8::String::New("<name> must be non-empty")));
}
// extract the action queue
v8::String::Utf8Value utf8queue(argv[1]);
@ -339,14 +343,24 @@ TRI_action_t const* TRI_LookupActionVocBase (triagens::rest::HttpRequest* reques
// check if we know a callback
vector<string> suffix = request->suffix();
bool poped = false;
// find longest prefix
while (true) {
string name = StringUtils::join(suffix, '/');
map<string, TRI_action_t*>::iterator i = Actions.find(name);
if (i != Actions.end()) {
return i->second;
TRI_action_t* action = i->second;
if (action->_options._prefix) {
return action;
}
else {
if (! poped) {
return action;
}
}
}
if (suffix.empty()) {
@ -354,6 +368,7 @@ TRI_action_t const* TRI_LookupActionVocBase (triagens::rest::HttpRequest* reques
}
suffix.pop_back();
poped = true;
}
return 0;
@ -621,6 +636,7 @@ void TRI_InitV8Actions (v8::Handle<v8::Context> context, char const* actionQueue
v8g->ContentTypeKey = v8::Persistent<v8::String>::New(v8::String::New("contentType"));
v8g->HeadersKey = v8::Persistent<v8::String>::New(v8::String::New("headers"));
v8g->ParametersKey = v8::Persistent<v8::String>::New(v8::String::New("parameters"));
v8g->PrefixKey = v8::Persistent<v8::String>::New(v8::String::New("prefix"));
v8g->RequestBodyKey = v8::Persistent<v8::String>::New(v8::String::New("requestBody"));
v8g->RequestTypeKey = v8::Persistent<v8::String>::New(v8::String::New("requestType"));
v8g->ResponseCodeKey = v8::Persistent<v8::String>::New(v8::String::New("responseCode"));

View File

@ -183,10 +183,12 @@ TRI_action_parameter_t;
typedef struct TRI_action_options_s {
TRI_action_options_s ()
: _parameters() {
: _parameters(),
_prefix(false) {
}
std::map<std::string, TRI_action_parameter_t> _parameters;
bool _prefix;
}
TRI_action_options_t;

View File

@ -86,6 +86,7 @@ typedef struct TRI_v8_global_s {
ContentTypeKey(),
JournalSizeKey(),
ParametersKey(),
PrefixKey(),
ResponseCodeKey(),
WaitForSyncKey(),
DocumentIdRegex(),
@ -342,6 +343,12 @@ typedef struct TRI_v8_global_s {
v8::Persistent<v8::String> ParametersKey;
////////////////////////////////////////////////////////////////////////////////
/// @brief "prefix" key name
////////////////////////////////////////////////////////////////////////////////
v8::Persistent<v8::String> PrefixKey;
////////////////////////////////////////////////////////////////////////////////
/// @brief "requestBody" key name
////////////////////////////////////////////////////////////////////////////////

View File

@ -866,11 +866,12 @@ static v8::Handle<v8::Value> JS_ByExampleHashIndex (v8::Arguments const& argv) {
/// @FUN{@FA{edge-collection}.edges(@FA{vertices})}
///
/// The @FN{edges} operator finds all edges starting from (outbound) or ending
/// in (inbound) a document from @FA{vertices}.
/// in (inbound) a document from @FA{vertices}, which must a list of documents
/// or document handles.
///
/// @EXAMPLES
///
/// @verbinclude shell_edge-edges
/// @verbinclude shell-edge-edges
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_EdgesQuery (v8::Arguments const& argv) {
@ -887,11 +888,11 @@ static v8::Handle<v8::Value> JS_EdgesQuery (v8::Arguments const& argv) {
/// @FUN{@FA{edge-collection}.inEdges(@FA{vertices})}
///
/// The @FN{edges} operator finds all edges ending in (inbound) a document from
/// @FA{vertices}.
/// @FA{vertices}, which must a list of documents or document handles.
///
/// @EXAMPLES
///
/// @verbinclude shell_edge-in-edges
/// @verbinclude shell-edge-in-edges
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_InEdgesQuery (v8::Arguments const& argv) {
@ -989,11 +990,11 @@ static v8::Handle<v8::Value> JS_NearQuery (v8::Arguments const& argv) {
/// @FUN{@FA{edge-collection}.outEdges(@FA{vertices})}
///
/// The @FN{edges} operator finds all edges starting from (outbound) a document
/// from @FA{vertices}.
/// from @FA{vertices}, which must a list of documents or document handles.
///
/// @EXAMPLES
///
/// @verbinclude shell_edge-out-edges
/// @verbinclude shell-edge-out-edges
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_OutEdgesQuery (v8::Arguments const& argv) {

View File

@ -1853,11 +1853,11 @@ static v8::Handle<v8::Value> JS_CountVocbaseCol (v8::Arguments const& argv) {
///
/// Delete a document:
///
/// @verbinclude shell_remove-document
/// @TINYEXAMPLE{shell_remove-document,delete a document}
///
/// Delete a document with a conflict:
///
/// @verbinclude shell_remove-document-conflict
/// @TINYEXAMPLE{shell_remove-document-conflict,delete a document}
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_RemoveVocbaseCol (v8::Arguments const& argv) {
@ -1878,11 +1878,10 @@ static v8::Handle<v8::Value> JS_RemoveVocbaseCol (v8::Arguments const& argv) {
///
/// @FUN{@FA{collection}.document(@FA{document})}
///
/// The @FN{document} method finds a document given it's identifier. It
/// returns the document. Note that the returned docuement contains two
/// pseudo-attributes, namely @LIT{_id} and @LIT{_rev}. @LIT{_id}
/// contains the @FA{docuement-handle} and @LIT{_rev} the revision of
/// the document.
/// The @FN{document} method finds a document given it's identifier. It returns
/// the document. Note that the returned document contains two
/// pseudo-attributes, namely @LIT{_id} and @LIT{_rev}. @LIT{_id} contains the
/// document-handle and @LIT{_rev} the revision of the document.
///
/// An error is thrown if there @LIT{_rev} does not longer match the current
/// revision of the document.
@ -1899,17 +1898,17 @@ static v8::Handle<v8::Value> JS_RemoveVocbaseCol (v8::Arguments const& argv) {
///
/// @EXAMPLES
///
/// Return the document for a document-handle:
/// Returns the document for a document-handle:
///
/// @verbinclude shell_read-document
/// @TINYEXAMPLE{shell-read-document,read document from a collection}
///
/// An error is raised if the document is unknown:
///
/// @verbinclude shell_read-document-not-found
/// @TINYEXAMPLE{shell-read-document-not-found,unknown handle}
///
/// An error is raised if the handle is invalid:
///
/// @verbinclude shell_read-document-bad-handle
/// @TINYEXAMPLE{shell-read-document-bad-handle,invalid handle}
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_DocumentVocbaseCol (v8::Arguments const& argv) {
@ -2426,20 +2425,14 @@ static v8::Handle<v8::Value> JS_EnsureSkiplistVocbaseCol (v8::Arguments const& a
/// Returns an object containing all collection figures.
///
/// - @LIT{alive.count}: The number of living documents.
///
/// - @LIT{alive.size}: The total size in bytes used by all
/// living documents.
///
/// - @LIT{dead.count}: The number of dead documents.
///
/// - @LIT{dead.size}: The total size in bytes used by all
/// dead documents.
///
/// - @LIT{dead.deletion}: The total number of deletion markers.
///
/// - @LIT{datafiles.count}: The number of active datafiles.
///
/// @EXAMPLES
///
/// @verbinclude shell_collection-figures
@ -2770,11 +2763,11 @@ static v8::Handle<v8::Value> JS_RenameVocbaseCol (v8::Arguments const& argv) {
///
/// Create and update a document:
///
/// @verbinclude shell_update-document
/// @TINYEXAMPLE{shell_update-document,updating a document}
///
/// Use a document handle:
///
/// @verbinclude shell_update-document-handle
/// @TINYEXAMPLE{shell_update-document-handle,updating a document}
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_ReplaceVocbaseCol (v8::Arguments const& argv) {
@ -2948,7 +2941,9 @@ static v8::Handle<v8::Value> JS_UnloadVocbaseCol (v8::Arguments const& argv) {
/// Saves a new edge and returns the document-handle. @FA{from} and @FA{to}
/// must be documents or document references.
///
/// @verbinclude shell_create-edge
/// @EXAMPLES
///
/// @TINYEXAMPLE{shell_create-edge,create an edge}
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_SaveEdgesCol (v8::Arguments const& argv) {
@ -3298,11 +3293,11 @@ static v8::Handle<v8::Value> JS_CreateVocBase (v8::Arguments const& argv) {
///
/// Delete a document:
///
/// @verbinclude shell_remove-document-db
/// @TINYEXAMPLE{shell_remove-document-db,delete a document}
///
/// Delete a document with a conflict:
///
/// @verbinclude shell_remove-document-conflict-db
/// @TINYEXAMPLE{shell_remove-document-conflict-db,delete a document}
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_RemoveVocbase (v8::Arguments const& argv) {
@ -3322,11 +3317,10 @@ static v8::Handle<v8::Value> JS_RemoveVocbase (v8::Arguments const& argv) {
///
/// @FUN{@FA{db}._document(@FA{document})}
///
/// The @FN{document} method finds a document given it's identifier. It
/// returns the document. Note that the returned docuement contains two
/// pseudo-attributes, namely @LIT{_id} and @LIT{_rev}. @LIT{_id}
/// contains the @FA{docuement-handle} and @LIT{_rev} the revision of
/// the document.
/// The @FN{document} method finds a document given it's identifier. It returns
/// the document. Note that the returned document contains two
/// pseudo-attributes, namely @LIT{_id} and @LIT{_rev}. @LIT{_id} contains the
/// document handle and @LIT{_rev} the revision of the document.
///
/// An error is thrown if there @LIT{_rev} does not longer match the current
/// revision of the document.
@ -3338,7 +3332,7 @@ static v8::Handle<v8::Value> JS_RemoveVocbase (v8::Arguments const& argv) {
///
/// @EXAMPLES
///
/// Return the document:
/// Returns the document:
///
/// @verbinclude shell_read-document-db
////////////////////////////////////////////////////////////////////////////////
@ -3383,7 +3377,7 @@ static v8::Handle<v8::Value> JS_DocumentVocbase (v8::Arguments const& argv) {
///
/// Create and update a document:
///
/// @verbinclude shell_update-document-db
/// @TINYEXAMPLE{shell_update-document-db,updating a document}
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_ReplaceVocbase (v8::Arguments const& argv) {

View File

@ -928,7 +928,7 @@ static void RunShell (v8::Handle<v8::Context> context) {
v8::Context::Scope contextScope(context);
v8::Local<v8::String> name(v8::String::New("(shell)"));
V8LineEditor* console = new V8LineEditor(context, ".avocsh");
V8LineEditor* console = new V8LineEditor(context, ".arangosh");
console->open(!noAutoComplete);
@ -936,7 +936,7 @@ static void RunShell (v8::Handle<v8::Context> context) {
while (! v8::V8::IdleNotification()) {
}
char* input = console->prompt("avocsh> ");
char* input = console->prompt("arangosh> ");
if (input == 0) {
break;
@ -999,7 +999,7 @@ static bool RunUnitTests (v8::Handle<v8::Context> context) {
// run tests
char const* input = "require(\"jsunity\").runCommandLineTests();";
v8::Local<v8::String> name(v8::String::New("(avocsh)"));
v8::Local<v8::String> name(v8::String::New("(arangosh)"));
TRI_ExecuteStringVocBase(context, v8::String::New(input), name, true);
if (tryCatch.HasCaught()) {
@ -1247,7 +1247,7 @@ int main (int argc, char* argv[]) {
}
printf("\n");
printf("Welcome to avocsh %s. Copyright (c) 2012 triAGENS GmbH.\n", TRIAGENS_VERSION);
printf("Welcome to arangosh %s. Copyright (c) 2012 triAGENS GmbH.\n", TRIAGENS_VERSION);
#ifdef TRI_V8_VERSION
printf("Using Google V8 %s JavaScript engine.\n", TRI_V8_VERSION);

View File

@ -1 +1 @@
0.4.2
0.5.0

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for triAGENS ArangoDB 0.4.2.
# Generated by GNU Autoconf 2.68 for triAGENS ArangoDB 0.5.0.
#
# Report bugs to <info@triagens.de>.
#
@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='triAGENS ArangoDB'
PACKAGE_TARNAME='arango'
PACKAGE_VERSION='0.4.2'
PACKAGE_STRING='triAGENS ArangoDB 0.4.2'
PACKAGE_VERSION='0.5.0'
PACKAGE_STRING='triAGENS ArangoDB 0.5.0'
PACKAGE_BUGREPORT='info@triagens.de'
PACKAGE_URL='http://www.arangodb.org'
@ -1398,7 +1398,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures triAGENS ArangoDB 0.4.2 to adapt to many kinds of systems.
\`configure' configures triAGENS ArangoDB 0.5.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1469,7 +1469,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of triAGENS ArangoDB 0.4.2:";;
short | recursive ) echo "Configuration of triAGENS ArangoDB 0.5.0:";;
esac
cat <<\_ACEOF
@ -1622,7 +1622,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
triAGENS ArangoDB configure 0.4.2
triAGENS ArangoDB configure 0.5.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -2087,7 +2087,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by triAGENS ArangoDB $as_me 0.4.2, which was
It was created by triAGENS ArangoDB $as_me 0.5.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -3214,7 +3214,7 @@ fi
# Define the identity of the package.
PACKAGE='arango'
VERSION='0.4.2'
VERSION='0.5.0'
cat >>confdefs.h <<_ACEOF
@ -10112,7 +10112,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by triAGENS ArangoDB $as_me 0.4.2, which was
This file was extended by triAGENS ArangoDB $as_me 0.5.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -10179,7 +10179,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
triAGENS ArangoDB config.status 0.4.2
triAGENS ArangoDB config.status 0.5.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -6,7 +6,7 @@ dnl ============================================================================
dnl PREAMBLE triAGENS GmbH Build Environment
dnl ============================================================================
AC_INIT([triAGENS ArangoDB], [0.4.2], [info@triagens.de], [arango], [http://www.arangodb.org])
AC_INIT([triAGENS ArangoDB], [0.5.0], [info@triagens.de], [arango], [http://www.arangodb.org])
dnl ----------------------------------------------------------------------------
dnl auxillary directory for install-sh and missing

View File

@ -173,7 +173,7 @@ actions.defineHttp({
}
if (req.requestType != actions.PUT) {
actions.unsupported(req, res);
actions.resultUnsupported(req, res);
}
else {
var limit = body.limit;
@ -290,7 +290,7 @@ actions.defineHttp({
}
if (req.requestType != actions.PUT) {
actions.unsupported(req, res);
actions.resultUnsupported(req, res);
}
else {
var limit = body.limit;
@ -396,7 +396,7 @@ actions.defineHttp({
}
if (req.requestType != actions.PUT) {
actions.unsupported(req, res);
actions.resultUnsupported(req, res);
}
else {
var limit = body.limit;
@ -482,7 +482,7 @@ actions.defineHttp({
}
if (req.requestType != actions.PUT) {
actions.unsupported(req, res);
actions.resultUnsupported(req, res);
}
else {
var example = body.example;
@ -511,6 +511,55 @@ actions.defineHttp({
}
});
////////////////////////////////////////////////////////////////////////////////
/// @brief returns all documents of a collection matching a given example
////////////////////////////////////////////////////////////////////////////////
actions.defineHttp({
url : API + "BY-EXAMPLE-HASH",
context : "api",
callback : function (req, res) {
var body = actions.getJsonBody(req, res);
if (body === undefined) {
return;
}
if (req.requestType != actions.PUT) {
actions.resultUnsupported(req, res);
}
else {
var limit = body.limit;
var skip = body.skip;
var name = body.collection;
var example = body.example;
var index = body.index;
var name = body.collection;
var id = parseInt(name) || name;
var collection = internal.db._collection(id);
if (collection == null) {
actions.collectionNotFound(req, res, name);
}
else if (typeof example !== "object") {
actions.badParameter(req, res, "example");
}
else {
try {
var result = collection.BY_EXAMPLE_HASH(index, example, skip, limit);
actions.resultOk(req, res, actions.HTTP_OK, result);
}
catch (err) {
actions.resultException(req, res, err);
}
}
}
}
});
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////

View File

@ -36,6 +36,39 @@ var actions = require("actions");
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief returns system status information for the server
////////////////////////////////////////////////////////////////////////////////
function AdminRedirect (req, res) {
var dest = "/_admin/html/index.html";
res.responseCode = actions.HTTP_MOVED_PERMANENTLY;
res.contentType = "text/html";
res.body = "<html><head><title>Moved</title></head><body><h1>Moved</h1><p>This page has moved to <a href=\""
+ dest
+ "\">"
+ dest
+ "</a>.</p></body></html>";
res.headers = { location : dest };
}
actions.defineHttp({
url : "",
context : "admin",
prefix : false,
callback : AdminRedirect
});
actions.defineHttp({
url : "_admin",
context : "admin",
prefix : false,
callback : AdminRedirect
});
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_GET_admin_status
/// @brief returns system status information for the server

View File

@ -394,8 +394,8 @@ ModuleCache["/internal"].exports.ArangoDatabase = ArangoDatabase;
////////////////////////////////////////////////////////////////////////////////
helpArangoDatabase = TRI_CreateHelpHeadline("ArangoDatabase help") +
'ArangoDatabase constructor: ' + "\n" +
' > db = new ArangoDatabase(connection); ' + "\n" +
'ArangoDatabase constructor: ' + "\n" +
' > db = new ArangoDatabase(connection); ' + "\n" +
' ' + "\n" +
'Administration Functions: ' + "\n" +
' _help(); this help ' + "\n" +
@ -826,8 +826,8 @@ ModuleCache["/internal"].exports.ArangoEdges = ArangoEdges;
////////////////////////////////////////////////////////////////////////////////
helpArangoEdges = TRI_CreateHelpHeadline("ArangoEdges help") +
'ArangoEdges constructor: ' + "\n" +
' > edges = new ArangoEdges(connection); ' + "\n" +
'ArangoEdges constructor: ' + "\n" +
' > edges = new ArangoEdges(connection); ' + "\n" +
' ' + "\n" +
'Administration Functions: ' + "\n" +
' _help(); this help ' + "\n" +
@ -954,7 +954,7 @@ ArangoCollection.STATUS_DELETED = 5;
////////////////////////////////////////////////////////////////////////////////
helpArangoCollection = TRI_CreateHelpHeadline("ArangoCollection help") +
'ArangoCollection constructor: ' + "\n" +
'ArangoCollection constructor: ' + "\n" +
' > col = db.mycoll; ' + "\n" +
' > col = db._create("mycoll"); ' + "\n" +
' ' + "\n" +
@ -1233,6 +1233,77 @@ ArangoCollection.prototype.ensureCapConstraint = function (size) {
return requestResult;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief adds a unique constraint
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.ensureUniqueConstraint = function () {
var body;
var fields = [];
for (var i = 0; i < arguments.length; ++i) {
fields.push(arguments[i]);
}
body = { type : "hash", unique : true, fields : fields };
var requestResult = this._database._connection.POST("/_api/index?collection=" + encodeURIComponent(this._id), JSON.stringify(body));
TRI_CheckRequestResult(requestResult);
return requestResult;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief adds a hash index
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.ensureHashIndex = function () {
var body;
var fields = [];
for (var i = 0; i < arguments.length; ++i) {
fields.push(arguments[i]);
}
body = { type : "hash", unique : false, fields : fields };
var requestResult = this._database._connection.POST("/_api/index?collection=" + encodeURIComponent(this._id), JSON.stringify(body));
TRI_CheckRequestResult(requestResult);
return requestResult;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief queries by example
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.BY_EXAMPLE_HASH = function (index, example, skip, limit) {
var body;
limit = limit || null;
skip = skip || null;
if (index.hasOwnProperty("id")) {
index = index.id;
}
body = { collection : this._id, index : index, skip : skip, limit : limit, example : {} };
for (var key in example) {
if (example.hasOwnProperty(key)) {
body.example[key] = example[key];
}
}
var requestResult = this._database._connection.PUT("/_api/simple/BY-EXAMPLE-HASH", JSON.stringify(body));
TRI_CheckRequestResult(requestResult);
return requestResult;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief adds an geo index
////////////////////////////////////////////////////////////////////////////////
@ -1594,7 +1665,7 @@ ModuleCache["/internal"].exports.ArangoEdgesCollection = ArangoEdgesCollection;
////////////////////////////////////////////////////////////////////////////////
helpArangoEdgesCollection = TRI_CreateHelpHeadline("ArangoEdgesCollection help") +
'ArangoEdgesCollection constructor: ' + "\n" +
'ArangoEdgesCollection constructor: ' + "\n" +
' > col = edges.mycoll; ' + "\n" +
' > col = db._create("mycoll"); ' + "\n" +
' ' + "\n" +
@ -1828,7 +1899,7 @@ function ArangoQueryCursor (database, data) {
////////////////////////////////////////////////////////////////////////////////
helpArangoQueryCursor = TRI_CreateHelpHeadline("ArangoQueryCursor help") +
'ArangoQueryCursor constructor: ' + "\n" +
'ArangoQueryCursor constructor: ' + "\n" +
' > cu1 = qi1.execute(); ' + "\n" +
'Functions: ' + "\n" +
' hasMore(); returns true if there ' + "\n" +
@ -2045,8 +2116,8 @@ function ArangoStatement (database, data) {
////////////////////////////////////////////////////////////////////////////////
helpArangoStatement = TRI_CreateHelpHeadline("ArangoStatement help") +
'ArangoStatement constructor: ' + "\n" +
' > st = new ArangoStatement({ "query" : "for ..." }); ' + "\n" +
'ArangoStatement constructor: ' + "\n" +
' > st = new ArangoStatement({ "query" : "for ..." }); ' + "\n" +
' > st = db._createStatement({ "query" : "for ..." }); ' + "\n" +
'Functions: ' + "\n" +
' bind(<key>, <value>); bind single variable ' + "\n" +
@ -2258,8 +2329,8 @@ ArangoStatement.prototype.execute = function () {
HELP = TRI_CreateHelpHeadline("Help") +
'Predefined objects: ' + "\n" +
' arango: ArangoConnection ' + "\n" +
' db: ArangoDatabase ' + "\n" +
' arango: ArangoConnection ' + "\n" +
' db: ArangoDatabase ' + "\n" +
'Example: ' + "\n" +
' > db._collections(); list all collections ' + "\n" +
' > db.<coll_name>.all(); list all documents ' + "\n" +
@ -2276,7 +2347,7 @@ HELP = TRI_CreateHelpHeadline("Help") +
helpQueries = TRI_CreateHelpHeadline("Select query help") +
'Create a select query: ' + "\n" +
' > st = new ArangoStatement(db, { "query" : "for..." }); ' + "\n" +
' > st = new ArangoStatement(db, { "query" : "for..." }); ' + "\n" +
' > st = db._createStatement({ "query" : "for..." }); ' + "\n" +
'Set query options: ' + "\n" +
' > st.setBatchSize(<value>); set the max. number of results ' + "\n" +

View File

@ -395,8 +395,8 @@ static string JS_client_client =
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"helpArangoDatabase = TRI_CreateHelpHeadline(\"ArangoDatabase help\") +\n"
"'ArangoDatabase constructor: ' + \"\\n\" +\n"
"' > db = new ArangoDatabase(connection); ' + \"\\n\" +\n"
"'ArangoDatabase constructor: ' + \"\\n\" +\n"
"' > db = new ArangoDatabase(connection); ' + \"\\n\" +\n"
"' ' + \"\\n\" +\n"
"'Administration Functions: ' + \"\\n\" +\n"
"' _help(); this help ' + \"\\n\" +\n"
@ -827,8 +827,8 @@ static string JS_client_client =
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"helpArangoEdges = TRI_CreateHelpHeadline(\"ArangoEdges help\") +\n"
"'ArangoEdges constructor: ' + \"\\n\" +\n"
"' > edges = new ArangoEdges(connection); ' + \"\\n\" +\n"
"'ArangoEdges constructor: ' + \"\\n\" +\n"
"' > edges = new ArangoEdges(connection); ' + \"\\n\" +\n"
"' ' + \"\\n\" +\n"
"'Administration Functions: ' + \"\\n\" +\n"
"' _help(); this help ' + \"\\n\" +\n"
@ -955,7 +955,7 @@ static string JS_client_client =
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"helpArangoCollection = TRI_CreateHelpHeadline(\"ArangoCollection help\") +\n"
"'ArangoCollection constructor: ' + \"\\n\" +\n"
"'ArangoCollection constructor: ' + \"\\n\" +\n"
"' > col = db.mycoll; ' + \"\\n\" +\n"
"' > col = db._create(\"mycoll\"); ' + \"\\n\" +\n"
"' ' + \"\\n\" +\n"
@ -1235,6 +1235,77 @@ static string JS_client_client =
"}\n"
"\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"/// @brief adds a unique constraint\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"ArangoCollection.prototype.ensureUniqueConstraint = function () {\n"
" var body;\n"
" var fields = [];\n"
" \n"
" for (var i = 0; i < arguments.length; ++i) {\n"
" fields.push(arguments[i]);\n"
" }\n"
"\n"
" body = { type : \"hash\", unique : true, fields : fields };\n"
"\n"
" var requestResult = this._database._connection.POST(\"/_api/index?collection=\" + encodeURIComponent(this._id), JSON.stringify(body));\n"
"\n"
" TRI_CheckRequestResult(requestResult);\n"
"\n"
" return requestResult;\n"
"}\n"
"\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"/// @brief adds a hash index\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"ArangoCollection.prototype.ensureHashIndex = function () {\n"
" var body;\n"
" var fields = [];\n"
" \n"
" for (var i = 0; i < arguments.length; ++i) {\n"
" fields.push(arguments[i]);\n"
" }\n"
"\n"
" body = { type : \"hash\", unique : false, fields : fields };\n"
"\n"
" var requestResult = this._database._connection.POST(\"/_api/index?collection=\" + encodeURIComponent(this._id), JSON.stringify(body));\n"
"\n"
" TRI_CheckRequestResult(requestResult);\n"
"\n"
" return requestResult;\n"
"}\n"
"\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"/// @brief queries by example\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"ArangoCollection.prototype.BY_EXAMPLE_HASH = function (index, example, skip, limit) {\n"
" var body;\n"
"\n"
" limit = limit || null;\n"
" skip = skip || null;\n"
"\n"
" if (index.hasOwnProperty(\"id\")) {\n"
" index = index.id;\n"
" }\n"
"\n"
" body = { collection : this._id, index : index, skip : skip, limit : limit, example : {} };\n"
"\n"
" for (var key in example) {\n"
" if (example.hasOwnProperty(key)) {\n"
" body.example[key] = example[key];\n"
" }\n"
" }\n"
"\n"
" var requestResult = this._database._connection.PUT(\"/_api/simple/BY-EXAMPLE-HASH\", JSON.stringify(body));\n"
"\n"
" TRI_CheckRequestResult(requestResult);\n"
"\n"
" return requestResult;\n"
"}\n"
"\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"/// @brief adds an geo index\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
@ -1595,7 +1666,7 @@ static string JS_client_client =
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"helpArangoEdgesCollection = TRI_CreateHelpHeadline(\"ArangoEdgesCollection help\") +\n"
"'ArangoEdgesCollection constructor: ' + \"\\n\" +\n"
"'ArangoEdgesCollection constructor: ' + \"\\n\" +\n"
"' > col = edges.mycoll; ' + \"\\n\" +\n"
"' > col = db._create(\"mycoll\"); ' + \"\\n\" +\n"
"' ' + \"\\n\" +\n"
@ -1829,7 +1900,7 @@ static string JS_client_client =
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"helpArangoQueryCursor = TRI_CreateHelpHeadline(\"ArangoQueryCursor help\") +\n"
"'ArangoQueryCursor constructor: ' + \"\\n\" +\n"
"'ArangoQueryCursor constructor: ' + \"\\n\" +\n"
"' > cu1 = qi1.execute(); ' + \"\\n\" +\n"
"'Functions: ' + \"\\n\" +\n"
"' hasMore(); returns true if there ' + \"\\n\" +\n"
@ -2046,8 +2117,8 @@ static string JS_client_client =
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"helpArangoStatement = TRI_CreateHelpHeadline(\"ArangoStatement help\") +\n"
"'ArangoStatement constructor: ' + \"\\n\" +\n"
"' > st = new ArangoStatement({ \"query\" : \"for ...\" }); ' + \"\\n\" +\n"
"'ArangoStatement constructor: ' + \"\\n\" +\n"
"' > st = new ArangoStatement({ \"query\" : \"for ...\" }); ' + \"\\n\" +\n"
"' > st = db._createStatement({ \"query\" : \"for ...\" }); ' + \"\\n\" +\n"
"'Functions: ' + \"\\n\" +\n"
"' bind(<key>, <value>); bind single variable ' + \"\\n\" +\n"
@ -2259,8 +2330,8 @@ static string JS_client_client =
"\n"
"HELP = TRI_CreateHelpHeadline(\"Help\") +\n"
"'Predefined objects: ' + \"\\n\" +\n"
"' arango: ArangoConnection ' + \"\\n\" +\n"
"' db: ArangoDatabase ' + \"\\n\" +\n"
"' arango: ArangoConnection ' + \"\\n\" +\n"
"' db: ArangoDatabase ' + \"\\n\" +\n"
"'Example: ' + \"\\n\" +\n"
"' > db._collections(); list all collections ' + \"\\n\" +\n"
"' > db.<coll_name>.all(); list all documents ' + \"\\n\" +\n"
@ -2277,7 +2348,7 @@ static string JS_client_client =
"\n"
"helpQueries = TRI_CreateHelpHeadline(\"Select query help\") +\n"
"'Create a select query: ' + \"\\n\" +\n"
"' > st = new ArangoStatement(db, { \"query\" : \"for...\" }); ' + \"\\n\" +\n"
"' > st = new ArangoStatement(db, { \"query\" : \"for...\" }); ' + \"\\n\" +\n"
"' > st = db._createStatement({ \"query\" : \"for...\" }); ' + \"\\n\" +\n"
"'Set query options: ' + \"\\n\" +\n"
"' > st.setBatchSize(<value>); set the max. number of results ' + \"\\n\" +\n"

View File

@ -86,15 +86,16 @@ ArangoEdgesCollection.prototype.all = ArangoCollection.prototype.all;
/// for the document. If you have more then one geo-spatial index, you can use
/// the @FN{geo} operator to select a particular index.
///
/// @note @FN{near} does not support negative skips.
/// @note @FN{near} does not support negative skips. However, you can still use
/// @FN{limit} followed to @FN{skip}.
///
/// @FUN{@FA{collection}.near(@FA{latitude}, @FA{longitude}).limit(@FA{limit})}
///////////////////////////////////////////////////////////////////////////////
///
/// Limits the result to @FA{limit} documents instead of the default 100.
///
/// @note @FA{limit} can be more than 100, this will raise the default
/// limit.
/// @note Unlike with multiple explicit limits, @FA{limit} will raise
/// the implicit default limit imposed by @FN{within}.
///
/// @FUN{@FA{collection}.near(@FA{latitude}, @FA{longitude}).distance()}
////////////////////////////////////////////////////////////////////////
@ -112,11 +113,12 @@ ArangoEdgesCollection.prototype.all = ArangoCollection.prototype.all;
///
/// To get the nearst two locations:
///
/// @verbinclude simple-query-near
/// @TINYEXAMPLE{simple-query-near,nearest two location}
///
/// If you need the distance as well, then you can use:
/// If you need the distance as well, then you can use the @FN{distance}
/// operator:
///
/// @verbinclude simple-query-near2
/// @TINYEXAMPLE{simple-query-near2,nearest two location with distance in meter}
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.near = function (lat, lon) {
@ -139,14 +141,14 @@ ArangoEdgesCollection.prototype.near = ArangoCollection.prototype.near;
/// for the document. If you have more then one geo-spatial index, you can use
/// the @FN{geo} operator to select a particular index.
///
/// @FUN{@FA{collection}.within(@FA{latitude}, @FA{longitude}, @FA{radius}).distance()}
///////////////////////////////////////////////////////////////////////////////////////
/// @FUN{@FA{collection}.within(@FA{latitude}, @FA{longitude}, @FA{radius})@LATEXBREAK.distance()}
//////////////////////////////////////////////////////////////////////////////////////////////////
///
/// This will add an attribute @LIT{_distance} to all documents returned, which
/// contains the distance between the given point and the document in meter.
///
/// @FUN{@FA{collection}.within(@FA{latitude}, @FA{longitude}, @FA{radius}).distance(@FA{name})}
////////////////////////////////////////////////////////////////////////////////////////////////
/// @FUN{@FA{collection}.within(@FA{latitude}, @FA{longitude}, @FA{radius})@LATEXBREAK.distance(@FA{name})}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// This will add an attribute @FA{name} to all documents returned, which
/// contains the distance between the given point and the document in meter.
@ -155,7 +157,7 @@ ArangoEdgesCollection.prototype.near = ArangoCollection.prototype.near;
///
/// To find all documents within a radius of 2000 km use:
///
/// @verbinclude simple-query-within
/// @TINYEXAMPLE{simple-query-within,within a radius}
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.within = function (lat, lon, radius) {
@ -191,7 +193,7 @@ ArangoEdgesCollection.prototype.within = ArangoCollection.prototype.within;
/// and a destination stored in the attribute @LIT{work}. Than you can use the
/// @FN{geo} operator to select, which coordinates to use in a near query.
///
/// @verbinclude simple-query-geo
/// @TINYEXAMPLE{simple-query-geo,use a specific index}
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.geo = function(loc, order) {
@ -261,16 +263,41 @@ ArangoEdgesCollection.prototype.geo = ArangoCollection.geo;
///
/// @FUN{@FA{collection}.byExample(@FA{example})}
///
/// Selects all documents of a collection that match the specified example and
/// returns a cursor. Allowed attribute types for searching are numbers,
/// strings, and boolean values.
/// Selects all documents of a collection that match the specified
/// example and returns a cursor.
///
/// You can use @FN{toArray}, @FN{next}, or @FN{hasNext} to access the
/// result. The result can be limited using the @FN{skip} and @FN{limit}
/// operator.
///
/// @note An attribute name of the form @LIT{a.b} is interpreted as attribute
/// path, not as attribute.
/// An attribute name of the form @LIT{a.b} is interpreted as attribute path,
/// not as attribute. If you use
///
/// @LIT{{ a : { c : 1 }}}
///
/// as example, then you will find all documents, such that the attribute
/// @LIT{a} contains a document of the form @LIT{{c : 1 }}. E.g., the document
///
/// @LIT{{ a : { c : 1 }\, b : 1 }}
///
/// will match, but the document
///
/// @LIT{{ a : { c : 1\, b : 1 }}}
///
/// will not.
///
/// However, if you use
///
/// @LIT{{ a.c : 1 }},
///
/// then you will find all documents, which contain a sub-document in @LIT{a}
/// that has an attribute @LIT{c} of value @LIT{1}. E.g., both documents
///
/// @LIT{{ a : { c : 1 }\, b : 1 }} and
///
/// @LIT{{ a : { c : 1\, b : 1 }}}
///
/// will match.
///
/// @FUN{@FA{collection}.byExample(@FA{path1}, @FA{value1}, ...)}
///
@ -280,11 +307,11 @@ ArangoEdgesCollection.prototype.geo = ArangoCollection.geo;
///
/// Use @FN{toArray} to get all documents at once:
///
/// @verbinclude simple18
/// @TINYEXAMPLE{simple18,convert into a list}
///
/// Use @FN{next} to loop over all documents:
///
/// @verbinclude simple19
/// @TINYEXAMPLE{simple19,iterate over the result-set}
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.byExample = function () {
@ -679,7 +706,7 @@ SimpleQuery.prototype.toArray = function () {
////////////////////////////////////////////////////////////////////////////////
/// @brief counts the number of documents
///
/// @FUN{count()}
/// @FUN{@FA{cursor}.count()}
///
/// The @FN{count} operator counts the number of document in the result set and
/// returns that number. The @FN{count} operator ignores any limits and returns
@ -688,7 +715,7 @@ SimpleQuery.prototype.toArray = function () {
/// @note Not all simple queries support counting. In this case @LIT{null} is
/// returned.
///
/// @FUN{count(@LIT{true})}
/// @FUN{@FA{cursor}.count(@LIT{true})}
///
/// If the result set was limited by the @FN{limit} operator or documents were
/// skiped using the @FN{skip} operator, the @FN{count} operator with argument
@ -723,7 +750,7 @@ SimpleQuery.prototype.count = function (applyPagination) {
////////////////////////////////////////////////////////////////////////////////
/// @brief checks if the cursor is exhausted
///
/// @FUN{hasNext()}
/// @FUN{@FA{cursor}.hasNext()}
///
/// The @FN{hasNext} operator returns @LIT{true}, then the cursor still has
/// documents. In this case the next document can be accessed using the
@ -743,7 +770,7 @@ SimpleQuery.prototype.hasNext = function () {
////////////////////////////////////////////////////////////////////////////////
/// @brief returns the next result document
///
/// @FUN{next()}
/// @FUN{@FA{cursor}.next()}
///
/// If the @FN{hasNext} operator returns @LIT{true}, then the underlying
/// cursor of the simple query still has documents. In this case the
@ -765,15 +792,11 @@ SimpleQuery.prototype.next = function() {
////////////////////////////////////////////////////////////////////////////////
/// @brief disposes the result
///
/// @FUN{dispose()}
/// @FUN{@FA{cursor}.dispose()}
///
/// If you are no longer interested in any further results, you should call
/// @FN{dispose} in order to free any resources associated with the query.
/// After calling @FN{dispose} you can no longer access the query.
///
/// @EXAMPLES
///
/// @verbinclude simple5
/// @FN{dispose} in order to free any resources associated with the cursor.
/// After calling @FN{dispose} you can no longer access the cursor.
////////////////////////////////////////////////////////////////////////////////
SimpleQuery.prototype.dispose = function() {

View File

@ -0,0 +1,224 @@
/*jslint indent: 2,
nomen: true,
maxlen: 80 */
/*global require,
db,
assertEqual, assertTrue,
print,
PRINT_OBJECT,
console,
ArangoCollection, ArangoEdgesCollection */
////////////////////////////////////////////////////////////////////////////////
/// @brief test the unique constraint
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-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, Lucas Dohmen
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
var jsunity = require("jsunity");
// -----------------------------------------------------------------------------
// --SECTION-- basic methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief test suite: Creation
////////////////////////////////////////////////////////////////////////////////
function HashIndexSuite() {
var ERRORS = internal.errors;
var cn = "UnitTestsCollectionHash";
var collection = null;
return {
////////////////////////////////////////////////////////////////////////////////
/// @brief set up
////////////////////////////////////////////////////////////////////////////////
setUp : function () {
internal.db._drop(cn);
collection = internal.db._create(cn, { waitForSync : false });
},
////////////////////////////////////////////////////////////////////////////////
/// @brief tear down
////////////////////////////////////////////////////////////////////////////////
tearDown : function () {
collection.drop();
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: hash index creation
////////////////////////////////////////////////////////////////////////////////
testCreationUniqueConstraint : function () {
var idx = collection.ensureHashIndex("a");
var id = idx.id;
assertNotEqual(0, id);
assertEqual("hash", idx.type);
assertEqual(false, idx.unique);
assertEqual(["a"], idx.fields);
assertEqual(true, idx.isNewlyCreated);
idx = collection.ensureHashIndex("a");
assertEqual(id, idx.id);
assertEqual("hash", idx.type);
assertEqual(false, idx.unique);
assertEqual(["a"], idx.fields);
assertEqual(false, idx.isNewlyCreated);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: index creation error handling
////////////////////////////////////////////////////////////////////////////////
testCreationPermutedUniqueConstraint : function () {
var idx = collection.ensureHashIndex("a", "b");
var id = idx.id;
assertNotEqual(0, id);
assertEqual("hash", idx.type);
assertEqual(false, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(true, idx.isNewlyCreated);
idx = collection.ensureHashIndex("b", "a");
assertEqual(id, idx.id);
assertEqual("hash", idx.type);
assertEqual(false, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(false, idx.isNewlyCreated);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: documents
////////////////////////////////////////////////////////////////////////////////
testUniqueDocuments : function () {
var idx = collection.ensureHashIndex("a", "b");
assertEqual("hash", idx.type);
assertEqual(false, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(true, idx.isNewlyCreated);
collection.save({ a : 1, b : 1 });
collection.save({ a : 1, b : 1 });
collection.save({ a : 1 });
collection.save({ a : 1 });
collection.save({ a : null, b : 1 });
collection.save({ a : null, b : 1 });
collection.save({ c : 1 });
collection.save({ c : 1 });
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: documents
////////////////////////////////////////////////////////////////////////////////
testReadDocuments : function () {
var idx = collection.ensureHashIndex("a", "b");
var fun = function(d) { return d._id; };
assertEqual("hash", idx.type);
assertEqual(false, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(true, idx.isNewlyCreated);
var d1 = collection.save({ a : 1, b : 1 })._id;
var d2 = collection.save({ a : 2, b : 1 })._id;
var d3 = collection.save({ a : 3, b : 1 })._id;
var d4 = collection.save({ a : 4, b : 1 })._id;
var d5 = collection.save({ a : 4, b : 2 })._id;
var d6 = collection.save({ a : 1, b : 1 })._id;
var d7 = collection.save({ a : 1 })._id;
var d8 = collection.save({ a : 1 })._id;
var d9 = collection.save({ a : null, b : 1 })._id;
var d10 = collection.save({ a : null, b : 1 })._id;
var d11 = collection.save({ c : 1 })._id;
var d12 = collection.save({ c : 1 })._id;
var s = collection.BY_EXAMPLE_HASH(idx.id, { a : 2, b : 1 });
assertEqual(1, s.total);
assertEqual(1, s.count);
assertEqual([d2], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : 1, b : 1 });
assertEqual(2, s.total);
assertEqual(2, s.count);
assertEqual([d1,d6], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : 1, b : null });
assertEqual(2, s.total);
assertEqual(2, s.count);
assertEqual([d7,d8], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : 1 });
assertEqual(2, s.total);
assertEqual(2, s.count);
assertEqual([d7,d8], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : null });
assertEqual(2, s.total);
assertEqual(2, s.count);
assertEqual([d11,d12], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { c : 1 });
assertEqual(2, s.total);
assertEqual(2, s.count);
assertEqual([d11,d12], s.documents.map(fun));
}
};
}
// -----------------------------------------------------------------------------
// --SECTION-- main
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief executes the test suites
////////////////////////////////////////////////////////////////////////////////
jsunity.run(HashIndexSuite);
return jsunity.done();
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)"
// End:

View File

@ -0,0 +1,224 @@
/*jslint indent: 2,
nomen: true,
maxlen: 80 */
/*global require,
db,
assertEqual, assertTrue,
print,
PRINT_OBJECT,
console,
ArangoCollection, ArangoEdgesCollection */
////////////////////////////////////////////////////////////////////////////////
/// @brief test the unique constraint
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-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, Lucas Dohmen
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
var jsunity = require("jsunity");
// -----------------------------------------------------------------------------
// --SECTION-- basic methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief test suite: Creation
////////////////////////////////////////////////////////////////////////////////
function UniqueConstraintSuite() {
var ERRORS = internal.errors;
var cn = "UnitTestsCollectionHash";
var collection = null;
return {
////////////////////////////////////////////////////////////////////////////////
/// @brief set up
////////////////////////////////////////////////////////////////////////////////
setUp : function () {
internal.db._drop(cn);
collection = internal.db._create(cn, { waitForSync : false });
},
////////////////////////////////////////////////////////////////////////////////
/// @brief tear down
////////////////////////////////////////////////////////////////////////////////
tearDown : function () {
collection.drop();
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: unique constraint creation
////////////////////////////////////////////////////////////////////////////////
testCreationUniqueConstraint : function () {
var idx = collection.ensureUniqueConstraint("a");
var id = idx.id;
assertNotEqual(0, id);
assertEqual("hash", idx.type);
assertEqual(true, idx.unique);
assertEqual(["a"], idx.fields);
assertEqual(true, idx.isNewlyCreated);
idx = collection.ensureUniqueConstraint("a");
assertEqual(id, idx.id);
assertEqual("hash", idx.type);
assertEqual(true, idx.unique);
assertEqual(["a"], idx.fields);
assertEqual(false, idx.isNewlyCreated);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: index creation error handling
////////////////////////////////////////////////////////////////////////////////
testCreationPermutedUniqueConstraint : function () {
var idx = collection.ensureUniqueConstraint("a", "b");
var id = idx.id;
assertNotEqual(0, id);
assertEqual("hash", idx.type);
assertEqual(true, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(true, idx.isNewlyCreated);
idx = collection.ensureUniqueConstraint("b", "a");
assertEqual(id, idx.id);
assertEqual("hash", idx.type);
assertEqual(true, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(false, idx.isNewlyCreated);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: documents
////////////////////////////////////////////////////////////////////////////////
testUniqueDocuments : function () {
var idx = collection.ensureUniqueConstraint("a", "b");
assertEqual("hash", idx.type);
assertEqual(true, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(true, idx.isNewlyCreated);
collection.save({ a : 1, b : 1 });
try {
collection.save({ a : 1, b : 1 });
fail();
}
catch (err) {
assertEqual(ERRORS.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED.code, err.errorNum);
}
collection.save({ a : 1 });
collection.save({ a : 1 });
collection.save({ a : null, b : 1 });
collection.save({ a : null, b : 1 });
collection.save({ c : 1 });
collection.save({ c : 1 });
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: documents
////////////////////////////////////////////////////////////////////////////////
testReadDocuments : function () {
var idx = collection.ensureUniqueConstraint("a", "b");
var fun = function(d) { return d._id; };
assertEqual("hash", idx.type);
assertEqual(true, idx.unique);
assertEqual(["a","b"].sort(), idx.fields.sort());
assertEqual(true, idx.isNewlyCreated);
var d1 = collection.save({ a : 1, b : 1 })._id;
var d2 = collection.save({ a : 2, b : 1 })._id;
var d3 = collection.save({ a : 3, b : 1 })._id;
var d4 = collection.save({ a : 4, b : 1 })._id;
var d5 = collection.save({ a : 4, b : 2 })._id;
collection.save({ a : 1 });
collection.save({ a : 1 });
collection.save({ a : null, b : 1 });
collection.save({ a : null, b : 1 });
collection.save({ c : 1 });
collection.save({ c : 1 });
var s = collection.BY_EXAMPLE_HASH(idx.id, { a : 1, b : 1 });
assertEqual(1, s.total);
assertEqual(1, s.count);
assertEqual([d1], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : 1, b : null });
assertEqual(0, s.total);
assertEqual(0, s.count);
assertEqual([], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : 1 });
assertEqual(0, s.total);
assertEqual(0, s.count);
assertEqual([], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { a : null });
assertEqual(0, s.total);
assertEqual(0, s.count);
assertEqual([], s.documents.map(fun));
s = collection.BY_EXAMPLE_HASH(idx.id, { c : 1 });
assertEqual(0, s.total);
assertEqual(0, s.count);
assertEqual([], s.documents.map(fun));
}
};
}
// -----------------------------------------------------------------------------
// --SECTION-- main
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief executes the test suites
////////////////////////////////////////////////////////////////////////////////
jsunity.run(UniqueConstraintSuite);
return jsunity.done();
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)"
// End:

View File

@ -51,6 +51,11 @@ var console = require("console");
/// @FA{options.url} is a prefix of the given url and no longer definition
/// matches.
///
/// @FA{options.prefix}
///
/// If @LIT{false}, then only use the action for excat matches. The default is
/// @LIT{true}.
///
/// @FA{options.context}
///
/// The context to which this actions belongs. Possible values are "admin",
@ -89,7 +94,7 @@ var console = require("console");
///
/// @FA{options.parameters}
///
/// Normally the paramaters are passed to the callback as strings. You can
/// Normally the parameters are passed to the callback as strings. You can
/// use the @FA{options}, to force a converstion of the parameter to
///
/// - @c "collection"
@ -103,7 +108,8 @@ function DefineHttp (options) {
var url = options.url;
var contexts = options.context;
var callback = options.callback;
var parameter = options.parameter;
var parameters = options.parameters;
var prefix = true;
var userContext = false;
if (! contexts) {
@ -134,6 +140,12 @@ function DefineHttp (options) {
return;
}
if (options.hasOwnProperty("prefix")) {
prefix = options.prefix;
}
var parameter = { parameters : parameters, prefix : prefix };
// console.debug("callback: %s", callback);
for (var i = 0; i < contexts.length; ++i) {
@ -535,18 +547,35 @@ exports.POST = "POST";
exports.PUT = "PUT";
// HTTP 2xx
exports.HTTP_OK = 200;
exports.HTTP_CREATED = 201;
exports.HTTP_ACCEPTED = 202;
exports.HTTP_OK = 200;
exports.HTTP_CREATED = 201;
exports.HTTP_ACCEPTED = 202;
exports.HTTP_PARTIAL = 203;
exports.HTTP_NO_CONTENT = 204;
// HTTP 3xx
exports.HTTP_MOVED_PERMANENTLY = 301;
exports.HTTP_FOUND = 302;
exports.HTTP_SEE_OTHER = 303;
exports.HTTP_NOT_MODIFIED = 304;
exports.HTTP_TEMPORARY_REDIRECT = 307;
// HTTP 4xx
exports.HTTP_BAD = 400;
exports.HTTP_NOT_FOUND = 404;
exports.HTTP_METHOD_NOT_ALLOWED = 405;
exports.HTTP_CONFLICT = 409;
exports.HTTP_BAD = 400;
exports.HTTP_UNAUTHORIZED = 401;
exports.HTTP_PAYMENT = 402;
exports.HTTP_FORBIDDEN = 403;
exports.HTTP_NOT_FOUND = 404;
exports.HTTP_METHOD_NOT_ALLOWED = 405;
exports.HTTP_CONFLICT = 409;
exports.HTTP_PRECONDITION_FAILED = 412;
exports.HTTP_UNPROCESSABLE_ENTIT = 422;
// HTTP 5xx
exports.HTTP_SERVER_ERROR = 500;
exports.HTTP_SERVER_ERROR = 500;
exports.HTTP_NOT_IMPLEMENTED = 501;
exports.HTTP_BAD_GATEWAY = 502;
exports.HTTP_SERVICE_UNAVAILABLE = 503;
// copy error codes
for (var name in internal.errors) {

View File

@ -153,22 +153,19 @@ SQ.SimpleQueryByExample.prototype.execute = function () {
////////////////////////////////////////////////////////////////////////////////
/// @brief constructs a query-by-example for a collection
///
/// @FUN{@FA{collection}.firstExample(@FA{path1}, @FA{value1}, ...)}
///
/// Returns the first documents of a collection that match the specified example
/// or @LIT{null}. The example must be specified as paths and
/// values. Allowed attribute types for searching are numbers, strings, and
/// boolean values.
///
/// @FUN{@FA{collection}.firstExample(@FA{example})}
///
/// As alternative you can supply an example as single argument. Note that an
/// attribute name of the form @LIT{a.b} is interpreted as attribute path, not
/// as attribute.
/// Returns the a document of a collection that match the specified example or
/// @LIT{null}. The example must be specified as paths and values. See @ref
/// JSF_ArangoCollection_prototype_byExample for details.
///
/// @FUN{@FA{collection}.firstExample(@FA{path1}, @FA{value1}, ...)}
///
/// As alternative you can supply a list of paths and values.
///
/// @EXAMPLES
///
/// @verbinclude shell-simple-query-first-example
/// @TINYEXAMPLE{shell-simple-query-first-example,finds a document with a given name}
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.firstExample = function () {