object_construct
Returns an OBJECT constructed from the arguments.
Syntax
Section titled “Syntax”object_construct( [<key>, <value> [, <key>, <value> , ...]] )
Arguments
Section titled “Arguments”The key in a key-value pair. Each key is a string value.
<value>
Section titled “<value>”The value that is associated with the key. The value can be any data type.
Returns
Section titled “Returns”Returns a value of type OBJECT.
Examples
Section titled “Examples”This example shows how to construct a simple object:
SELECT object_construct('a', 1, 'b', 'BBBB', 'c', NULL);
+--------------------------------------------------+| object_construct('a', 1, 'b', 'BBBB', 'c', NULL) |+--------------------------------------------------+| {"a":1,"b":'BBBB'} |+--------------------------------------------------+