ST_AsBinary

更新时间:
复制 MD 格式

Converts a scene object to a bytea binary representation.

Syntax

bytea ST_AsBinary(scene sceneObject);
bytea ST_AsBinary(scene sceneObject, cstring endian);

Parameters

ParameterDescription
sceneObjectThe scene object to convert.
endianThe byte order of the output. Valid values: NDR (little-endian), XDR (big-endian).

Examples

Return the binary representation of a scene object:

SELECT ST_AsBinary(ST_sceneFromText('{"type" : "gltf", "content" : {"accessors":...}}'));
--------------
\x01280000005...

Return the binary representation using big-endian byte order:

SELECT ST_AsBinary(ST_sceneFromText('{"type" : "gltf", "content" : {"accessors":...}}'), 'XDR');
--------------
\x0000000028...