Jelix\Installer\AbstractInstaller::execSQLScript PHP Метод

execSQLScript() закрытый защищенный Метод

The name of the script should be store in install/$name.databasetype.sql in the directory of the component. (replace databasetype by mysql, pgsql etc.) You can however provide a script compatible with all databases, but then you should indicate the full name of the script, with a .sql extension.
final protected execSQLScript ( string $name, string $module = null, boolean $inTransaction = true )
$name string the name of the script
$module string the module from which we should take the sql file. null for the current module
$inTransaction boolean indicate if queries should be executed inside a transaction
    protected final function execSQLScript($name, $module = null, $inTransaction = true)
    {
        $conn = $this->dbConnection();
        $tools = $this->dbTool();
        if ($module) {
            $conf = $this->entryPoint->getConfigObj()->_modulesPathList;
            if (!isset($conf[$module])) {
                throw new Exception('execSQLScript : invalid module name');
            }
            $path = $conf[$module];
        } else {
            $path = $this->path;
        }
        $file = $path . 'install/' . $name;
        if (substr($name, -4) != '.sql') {
            $file .= '.' . $conn->dbms . '.sql';
        }
        if ($inTransaction) {
            $conn->beginTransaction();
        }
        try {
            $tools->execSQLScript($file);
            if ($inTransaction) {
                $conn->commit();
            }
        } catch (\Exception $e) {
            if ($inTransaction) {
                $conn->rollback();
            }
            throw $e;
        }
    }