Use extern "C" functions to enable your custom internal adapter for schema discovery.
Method | Description |
---|---|
extern "C" DLLEXPORT bool canDiscover(void* adapter) | Checks whether an adapter supports discovery. This is the first API called when an adapter is running schema discovery. Adapters that support discovery return a value of true. |
extern "C" DLLEXPORT void setDiscovery(void* adapter) | Tells the adapter that it is running in discovery mode. |
extern "C" DLLEXPORT int getTableNames(void* adapter, char*** tables) | Points to an array of strings that populates tables. The function returns table names when discovering tables in a database, or file names when discovering particular types of files in a directory. |
extern "C" DLLEXPORT int getFieldNames(void* adapter, char*** names, const char* tableName) | Retrieves field names. |
extern "C" DLLEXPORT int getFieldTypes(void* adapter, char*** types, const char* tableName) | Retrieves field types. |
extern "C" DLLEXPORT int getSampleRow(void* adapter, char*** row, const char* tableName, int pos) | Retrieves sample rows. |