| 1391 | } |
| 1392 | |
| 1393 | static cell_t SQL_ReadDriver(IPluginContext *pContext, const cell_t *params) |
| 1394 | { |
| 1395 | IDatabase *db1=NULL; |
| 1396 | HandleError err; |
| 1397 | |
| 1398 | if ((err = g_DBMan.ReadHandle(params[1], DBHandle_Database, (void **)&db1)) |
| 1399 | != HandleError_None) |
| 1400 | { |
| 1401 | return pContext->ThrowNativeError("Invalid database Handle 1/%x (error: %d)", params[1], err); |
| 1402 | } |
| 1403 | |
| 1404 | IDBDriver *driver = db1->GetDriver(); |
| 1405 | |
| 1406 | pContext->StringToLocalUTF8(params[2], params[3], driver->GetIdentifier(), NULL); |
| 1407 | |
| 1408 | return driver->GetHandle(); |
| 1409 | } |
| 1410 | |
| 1411 | static cell_t Database_Driver_get(IPluginContext *pContext, const cell_t *params) |
| 1412 | { |
nothing calls this directly
no test coverage detected