DDL function
- Last Updated: May 12, 2026
- 1 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
When the DDL function in the IP is called, the DDL function should perform the following steps:
-
Get information about the table (name, owner, qualifier).
pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_TABLE);damobj_table pTableObj = getFirstSchemaObject(pList); -
Get column definitions.
pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_COLUMN);damobj_column pColumnObj = dam_getFirstSchemaObject(pList);while ( pColumnObj ){pColumnObj = dam_getNextSchemaObject(pList);/* get the column attributes */} -
Get the index definition.
pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_STAT);damobj_stat pStatObj = dam_getFirstSchemaObject(pList);while ( pStatObj ){/* get the index information from pStatObj */pStatObj = dam_getNextSchemaObject(pList);} -
Get foreign keys information
pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_FKEY);damobj_stat pFkeyObj = getFirstSchemaObject(pList);while ( pFkeyObj ){pFkeyObj = dam_getNextSchemaObject(pList);/* get the foreign key attributes */} -
Use the supplied table, columns and foreign keys information to create your table.