將各種資料類型轉為二進位格式。
文法
bytea ST_AsBinary(meshgeom geom);
bytea ST_AsBinary(sfmesh sfmeshObject);
bytea ST_AsBinary(material material);
bytea ST_AsBinary(texture texture);
bytea ST_AsBinary(meshgeom geom, cstring endian);
bytea ST_AsBinary(sfmesh sfmeshObject, cstring endian);
bytea ST_AsBinary(material material, cstring endian);
bytea ST_AsBinary(texture texture, cstring endian);參數
| 參數名稱 | 描述 |
| geom | meshgeom對象。 |
| sfmeshObject | sfmesh對象。 |
| material | material對象。 |
| texture | texture對象。 |
| endian | 大小端,取值為:
|
描述
將各種資料類型轉為二進位格式,功能等同於強制類型轉換::bytea。
樣本
select ST_AsBinary(ST_MeshFromText('{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}'));
------------------------------------------------------------------------------
\x014d0102...