public function getCompiler(): SQL\Compiler
    {
        if ($this->compiler === null) {
            switch ($this->getDriver()) {
                case 'mysql':
                    $this->compiler = new SQL\Compiler\MySQL();
                    break;
                case 'dblib':
                case 'mssql':
                case 'sqlsrv':
                case 'sybase':
                    $this->compiler = new SQL\Compiler\SQLServer();
                    break;
                case 'oci':
                case 'oracle':
                    $this->compiler = new SQL\Compiler\Oracle();
                    break;
                case 'firebird':
                    $this->compiler = new SQL\Compiler\Firebird();
                    break;
                case 'db2':
                case 'ibm':
                case 'odbc':
                    $this->compiler = new SQL\Compiler\DB2();
                    break;
                case 'nuodb':
                    $this->compiler = new SQL\Compiler\NuoDB();
                    break;
                default:
                    $this->compiler = new SQL\Compiler();
            }

            $this->compiler->setOptions($this->compilerOptions);
        }

        return $this->compiler;
    }