MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / SQL_ReadDriver

Function SQL_ReadDriver

core/logic/smn_database.cpp:1393–1409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1391}
1392
1393static 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
1411static cell_t Database_Driver_get(IPluginContext *pContext, const cell_t *params)
1412{

Callers

nothing calls this directly

Calls 4

ReadHandleMethod · 0.45
GetDriverMethod · 0.45
GetIdentifierMethod · 0.45
GetHandleMethod · 0.45

Tested by

no test coverage detected