Use extern "C" functions to enable your custom internal adapter for schema discovery.
Method | Description |
---|---|
extern "C" DLLEXPORT bool canDiscover(void* adapter) | During discovery, this is the first method called by the adapter framework to check whether an adapter supports discovery. Adapters that support discovery return a value of true. |
extern "C" DLLEXPORT void setDiscovery(void* adapter) | This method tells the adapter that it is running in discovery mode. |
extern "C" DLLEXPORT int getTableNames(void* adapter, char*** tables) | This method is a pointer to an array of strings that populates tables. The method contains 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) | This method returns field names. |
extern "C" DLLEXPORT int getFieldTypes(void* adapter, char*** types, const char* tableName) | This method returns field types. |
extern "C" DLLEXPORT int getSampleRow(void* adapter, char*** row, const char* tableName, int pos) | This method returns sample rows. |