1
0
Fork 0

Merge pull request #1678 from kibarda/devel

Documentation: Aql Fundamentals improvements
This commit is contained in:
Wilfried Goesgens 2016-01-25 10:29:07 +01:00
commit ef82a2279d
5 changed files with 62 additions and 60 deletions

View File

@ -1,10 +1,11 @@
!CHAPTER AQL Fundamentals
* [AQL Syntax](Syntax.md)
* [Data Types](DataTypes.md)
* [Bind Parameters](BindParameters.md)
* [Type and value order](TypeValueOrder.md)
* [Accessing Data from Collections](DocumentData.md)
* [Query Results](QueryResults.md)
* [AQL Syntax](Syntax.md) explains the structure of the AQL language.
* [Data Types](DataTypes.md) describes the primitive and compound data types supported by AQL.
* [Bind Parameters](BindParameters.md): AQL supports the usage of bind parameters. This allows to separate the query text from literal values used in the query.
* [Type and value order](TypeValueOrder.md): AQL uses a set of rules (using values and types) for equality checks and comparisons.
* [Accessing Data from Collections](DocumentData.md): describes the impact of non-existent or null attributes for selection queries.
* [Query Results](QueryResults.md): the result of an AQL query is an array of values.
* [Query Errors](QueryErrors.md): errors may arise from the AQL parsing or execution.

View File

@ -0,0 +1,31 @@
!CHAPTER Errors
Issuing an invalid query to the server will result in a parse error if the query
is syntactically invalid. ArangoDB will detect such errors during query
inspection and abort further processing. Instead, the error number and an error
message are returned so that the errors can be fixed.
If a query passes the parsing stage, all collections referenced in the query
will be opened. If any of the referenced collections is not present, query
execution will again be aborted and an appropriate error message will be
returned.
Under some circumstances, executing a query may also produce run-time errors
that cannot be predicted from inspecting the query text alone. This is because
queries may use data from collections that may also be inhomogeneous. Some
examples that will cause run-time errors are:
- Division by zero: Will be triggered when an attempt is made to use the value
*0* as the divisor in an arithmetic division or modulus operation
- Invalid operands for arithmetic operations: Will be triggered when an attempt
is made to use any non-numeric values as operands in arithmetic operations.
This includes unary (unary minus, unary plus) and binary operations (plus,
minus, multiplication, division, and modulus)
- Invalid operands for logical operations: Will be triggered when an attempt is
made to use any non-boolean values as operand(s) in logical operations. This
includes unary (logical not/negation), binary (logical and, logical or), and
the ternary operators
Please refer to the [Arango Errors](../ErrorCodes/README.md) page for a list of error codes and
meanings.

View File

@ -42,34 +42,3 @@ found, it will produce an empty result array:
[ ]
!SUBSECTION Errors
Issuing an invalid query to the server will result in a parse error if the query
is syntactically invalid. ArangoDB will detect such errors during query
inspection and abort further processing. Instead, the error number and an error
message are returned so that the errors can be fixed.
If a query passes the parsing stage, all collections referenced in the query
will be opened. If any of the referenced collections is not present, query
execution will again be aborted and an appropriate error message will be
returned.
Under some circumstances, executing a query may also produce run-time errors
that cannot be predicted from inspecting the query text alone. This is because
queries may use data from collections that may also be inhomogeneous. Some
examples that will cause run-time errors are:
- Division by zero: Will be triggered when an attempt is made to use the value
*0* as the divisor in an arithmetic division or modulus operation
- Invalid operands for arithmetic operations: Will be triggered when an attempt
is made to use any non-numeric values as operands in arithmetic operations.
This includes unary (unary minus, unary plus) and binary operations (plus,
minus, multiplication, division, and modulus)
- Invalid operands for logical operations: Will be triggered when an attempt is
made to use any non-boolean values as operand(s) in logical operations. This
includes unary (logical not/negation), binary (logical and, logical or), and
the ternary operators
Please refer to the [Arango Errors](../ErrorCodes/README.md) page for a list of error codes and
meanings.

View File

@ -1,4 +1,4 @@
!CHAPTER AQL Examples
!CHAPTER Usual Query Patterns Examples
This page contains some examples how to write queries in AQL. For better
understandability the query results are also included directly below each query.

View File

@ -73,23 +73,13 @@
* [How to invoke AQL](Aql/Invoke.md)
* [Data modification queries](Aql/DataModification.md)
* [AQL Fundamentals](Aql/Fundamentals.md)
* [Syntax](Aql/Syntax.md)
* [AQL Syntax](Aql/Syntax.md)
* [Data types](Aql/DataTypes.md)
* [Bind Parameters](Aql/BindParameters.md)
* [Type and value order](Aql/TypeValueOrder.md)
* [Accessing data from collections](Aql/DocumentData.md)
* [Query Results](Aql/QueryResults.md)
* [Functions](Aql/Functions.md)
* [Type cast](Aql/TypeCastFunctions.md)
* [String](Aql/StringFunctions.md)
* [Numeric](Aql/NumericFunctions.md)
* [Date](Aql/DateFunctions.md)
* [Array](Aql/ArrayFunctions.md)
* [Object / Document](Aql/DocumentFunctions.md)
* [Geo](Aql/GeoFunctions.md)
* [Fulltext](Aql/FulltextFunctions.md)
* [Miscellaneous](Aql/MiscellaneousFunctions.md)
* [Operators](Aql/Operators.md)
* [Query Errors](Aql/QueryErrors.md)
* [High level Operations](Aql/Operations.md)
* [For](AqlOperations/For.md)
* [Return](AqlOperations/Return.md)
@ -103,29 +93,40 @@
* [Replace](AqlOperations/Replace.md)
* [Insert](AqlOperations/Insert.md)
* [Upsert](AqlOperations/Upsert.md)
* [Operators](Aql/Operators.md)
* [Functions](Aql/Functions.md)
* [Type cast](Aql/TypeCastFunctions.md)
* [String](Aql/StringFunctions.md)
* [Numeric](Aql/NumericFunctions.md)
* [Date](Aql/DateFunctions.md)
* [Array](Aql/ArrayFunctions.md)
* [Object / Document](Aql/DocumentFunctions.md)
* [Geo](Aql/GeoFunctions.md)
* [Fulltext](Aql/FulltextFunctions.md)
* [Miscellaneous](Aql/MiscellaneousFunctions.md)
* [Graphs](Aql/Graphs.md)
* [Traversal](Aql/GraphTraversals.md)
* [Named Operations](Aql/GraphOperations.md)
* [Other](Aql/GraphFunctions.md)
* [Advanced Features](Aql/Advanced.md)
* [Combining Queries](Aql/CombiningQueries.md)
* [Array Operators](Aql/ArrayOperators.md)
* [Extending AQL](AqlExtending/README.md)
* [Usual Query Patterns](AqlExamples/README.md)
* [Collection based queries](AqlExamples/CollectionQueries.md)
* [Data-modification queries](AqlExamples/DataModificationQueries.md)
* [Subqueries](Aql/CombiningQueries.md)
* [Projections and filters](AqlExamples/ProjectionsAndFilters.md)
* [Joins](AqlExamples/Join.md)
* [Grouping](AqlExamples/Grouping.md)
* [Traversals](AqlExamples/CombiningGraphTraversals.md)
* [User Functions](AqlExtending/README.md)
* [Conventions](AqlExtending/Conventions.md)
* [Registering Functions](AqlExtending/Functions.md)
* [Execution and performance](Aql/ExecutionPerformance.md)
* [Execution and Performance](Aql/ExecutionPerformance.md)
* [Query statistics](Aql/QueryStatistics.md)
* [Parsing queries](Aql/ParsingQueries.md)
* [Explaining queries](Aql/ExplainingQueries.md)
* [Optimizing queries](Aql/Optimizer.md)
* [Caching query results](Aql/QueryCache.md)
* [AQL Examples](AqlExamples/README.md)
* [Collection based queries](AqlExamples/CollectionQueries.md)
* [Data-modification queries](AqlExamples/DataModificationQueries.md)
* [Projections and filters](AqlExamples/ProjectionsAndFilters.md)
* [Joins](AqlExamples/Join.md)
* [Grouping](AqlExamples/Grouping.md)
* [Traversals](AqlExamples/CombiningGraphTraversals.md)
* [Graphs](Graphs/README.md)
* [General Graphs](GeneralGraphs/README.md)
* [Graph Management](GeneralGraphs/Management.md)