Helper for Database operations

package salt\sql

 Methods

Create and initialize tables with DAO metadata

createTablesFromObjects(\salt\DBHelper $db, array<mixed,\salt\Base> $objects) 
Static

Parameters

$db

\salt\DBHelper

database to use

$objects

array<mixed,\salt\Base>

array of Base objects for create their tables

Check if tables exists

missingTables(\salt\DBHelper $db, array<mixed,string> $classNames) : array<mixed,\salt\Base>
Static

Parameters

$db

\salt\DBHelper

database to use

$classNames

array<mixed,string>

classname of object to check existence

Returns

array<mixed,\salt\Base>Base objects if their DB table is missing