Symisc Vedis

An Embeddable Datastore Engine



Vedis C/C++ API Reference - Array Type Processing.

Syntax

unsigned int vedis_array_count(vedis_value *pArray);


Return the total number of entries in a given array.


Description


This routine return the total number of entries in a given vedis array.


The vedis_value must be of type array obtained by a prior successful call to vedis_context_new_array() or passed as parameter to the foreign command.


Call vedis_value_is_array() to check if the given vedis_value is of the expected type. 


Note: This routine is not thread-safe.


Parameters


pArray

vedis_value to query which must be of type array.


Return value


This function return the total number of entries on success. 0 (zero) is returned if the target array is empty or the given vedis_value is not of the expected type (i.e: A scalar value such as an integer, Boolean, double, etc.).


Example


Compile this C file for a smart introduction to the array handling interfaces.


See also


vedis_array_walk, vedis_array_insert, vedis_array_fetch.



Symisc Systems
Copyright © Symisc Systems