Skip to content

Commit

Permalink
Merge pull request #45 from tgpfeiffer/array_length
Browse files Browse the repository at this point in the history
add documentation for array_length
  • Loading branch information
nobu-k committed Jul 12, 2016
2 parents a99c0f1 + 8f08bfc commit bc30d88
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/bql/functions.rst
Expand Up @@ -166,6 +166,16 @@ Time Functions
+-----------------------------------------------------+--------------------------------------------------------------+


Array Functions
===============

+-------------------------------------------------------+---------------------------------------------------+
| Function | Description |
+=======================================================+===================================================+
| :ref:`array_length(a) <ref_func_array_length>` | number of elements in an array |
+-------------------------------------------------------+---------------------------------------------------+


Other Scalar Functions
======================

Expand Down
42 changes: 42 additions & 0 deletions source/ref/functions.rst
Expand Up @@ -1694,6 +1694,48 @@ Return Type



Array Functions
===============


.. _ref_func_array_length:

``array_length``
----------------

::

array_length(a)

Description
^^^^^^^^^^^

``array_length`` computes the number of elements in an array ``a``.
Elements with a NULL value are also counted.


Parameter Types
^^^^^^^^^^^^^^^

``a``
``array``

Return Type
^^^^^^^^^^^

``int``

Examples
^^^^^^^^

+------------------------------------+----------+
| Function Call | Result |
+====================================+==========+
| ``array_length([3, NULL, "foo"])`` | ``3`` |
+------------------------------------+----------+




Other Scalar Functions
======================
Expand Down

0 comments on commit bc30d88

Please sign in to comment.