Symisc Vedis

An Embeddable Datastore Engine



Vedis C/C++ API Reference - Vedis Object Values Type.

Syntax

int unqlite_value_is_int(vedis_value *pVal);

int vedis_value_is_float(vedis_value *pVal);

int vedis_value_is_bool(vedis_value *pVal);

int vedis_value_is_string(vedis_value *pVal);

int vedis_value_is_null(vedis_value *pVal);

int vedis_value_is_numeric(vedis_value *pVal);

int vedis_value_is_scalar(vedis_value *pVal);

int vedis_value_is_array(vedis_value *pVal);


Check if the given Vedis object value is of the expected type.


Description


As their name suggests, these routines returns TRUE (1) if the given vedis_value is of the expected type. For example vedis_value_is_int() return TRUE only if the given vedis_value is of type integer, vedis_value_is_string() return TRUE only if the given vedis_value is of type string and so forth.


Note that these routines does not perform any conversion. If such behavior is wanted, use vedis_value_to_string() vedis_value_to_int(), etc. instead.


These routines are useful inside foreign commands to make sure that the given arguments are of the expected type.


Parameters


pVal

A pointer to a vedis value.


Return value


These routines returns 1 (TRUE) if the given vedis_value is of the expected type. 0 (FALSE) otherwise.


Example


Compile this C file for a smart introduction to these interfaces.


See also


On Demand Object Allocation, Populating Object Values, Setting the Result of a Foreign Command, Obtaining Vedis Object Values.



Symisc Systems
Copyright © Symisc Systems