static public function compileDSN(&$params) {
        $dsn = '';
        if (!isset($params['user'])) $params['user'] = 'root';
        if (!isset($params['pass'])) $params['pass'] = null;
        if (!isset($params['type'])) $params['type'] = 'mysql';
        if (!isset($params['host'])) $params['host'] = '127.0.0.1';

        if (!empty($params['dsn'])) {
            $dsn = $params['dsn'];
        } else {
            $dsn = $params['type'] . ':host='.$params['host'];
        }
        return $dsn;
    }