skip to main content
Designing and coding the IP : DDL object management
 

DDL object management

The IP may choose to support the DDL function to allow table and index objects to be created and destroyed in the data source. The OpenAccess SDK SQL engine parses the DDL syntax and builds a list of these objects:
damobj_table
damobj_column
damobj_stat
damobj_fkey
The IP can retrieve these objects to gather the information required to create a table or an index. Each of the DDL operations has an associated support flag, which the OpenAccess SDK SQL engine uses to determine whether to allow the requested DDL operation.
To support DDL, the IP must perform the following steps:
1. Register a DDL IP function to handle DDL requests.
2. Turn on support in IP GETSUPPORT for the types of DDL commands you want to support.
3. Implement the DDL function as part of your IP to take in information in objects of different types and to generate the required native calls.
The IP is called with the requested operation. The IP then calls dam_getSchemaObjectList to get different types of lists. The IP then calls dam_getFirstSchemaObject and dam_getNextSchemaObject to navigate through these lists and perform the required operations.