17.00 - 17.05 - FNC_GetStructuredAttributeInfoの使用例 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL外部ルーチン プログラミング

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Published
2020年6月
Content Type
プログラミング リファレンス
Publication ID
B035-1147-170K-JPN
Language
日本語 (日本)
void getMap( UDT_HANDLE *geometriesUdt,
             INTEGER    *result,
             char        sqlstate[6])
{
    attribute_info_t attributeInfo;
    int nullIndicator;
    int length;
    int bufSize = 0;
    void * tmpBuf = 0;

    /* Get the attribute information for the first attribute. */
    FNC_GetStructuredAttributeInfo(*geometriesUdt, 0, 
         sizeof(attribute_info_t), &attributeInfo); 
    /* Get the value of the first attribute. */
    bufSize = attributeInfo.max_length;
    tmpBuf = FNC_malloc(bufSize);
    FNC_GetStructuredAttributeByNdx(*geometriesUdt, 0, tmpBuf, bufSize,
        &nullIndicator, &length);

    ...
}