Checks if a DB driver is installed.
481815
private function hasDatabaseDriver()
    {
        if (!count($this->getDatabaseDrivers())) {
            $this->console->error(
                'At least 1 PDO driver is required. Either sqlite, mysql or pgsql, check your php.ini file'
            );
            $this->errors = true;
        }
        return false;
    }
56570
public boolean validateJdbc() {

        boolean result = false;
        String libFolder = getLibFolder();
        Iterator<String> it = getDatabaseLibs(getDatabase()).iterator();
        while (it.hasNext()) {
            String libName = it.next();
            File libFile = new File(libFolder, libName);
            if (libFile.exists()) {
                result = true;
            }
        }
        return result;
    }
264951
function (account) {
	// check if DB is initialized
	if (typeof l_accounts === 'undefined') {
		LOG.error('DB module is not loaded, please enable DB module', l_name);
		return false;
	}

	if (l_accounts.hasOwnProperty(account) === false) {
		LOG.error('[' + account + '] not found', l_name);
		return false;
	}

	return true;
}
1301925
protected static function _tableExists()
    {
        $db = ConnectionManager::get('default');
        $tables = $db->schemaCollection()->listTables();

        if (in_array('settings_configurations', $tables)) {
            return true;
        }
        return false;
    }
37510
public boolean isJDBCDriver(String jdbcDriverName) throws Exception {
        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_DATASOURCES);
        String haystack = JDBC_DRIVER;
        return null != findNodeInList(addr, haystack, jdbcDriverName);
    }
779311
function isInstalled(dep) {
    if (_.has(exceptions, dep)) return exceptions[dep];
    return installedDeps.has(dep);
}
31094
def is_installed(name):
    
    pkgs = installed_packages()
    for pkge in pkgs:
        if pkge.name == name:
            return True
    return False
210254
public function isInstalled()
    {
        if ($this->installed === null) {
            if (!$this->isShared('config')) {
                throw new Exception('Attempting to check install status before application initialization.');
            }

            $this->installed = $this->make('config')->get('concrete.installed');
        }

        return $this->installed;
    }
1121420
def _CheckSQLite3(self):
    
    # On Windows sqlite3 can be provided by both pysqlite2.dbapi2 and
    # sqlite3. sqlite3 is provided with the Python installation and
    # pysqlite2.dbapi2 by the pysqlite2 Python module. Typically
    # pysqlite2.dbapi2 would contain a newer version of sqlite3, hence
    # we check for its presence first.
    module_name = 'pysqlite2.dbapi2'
    minimum_version = '3.7.8'

    module_object = self._ImportPythonModule(module_name)
    if not module_object:
      module_name = 'sqlite3'

    module_object = self._ImportPythonModule(module_name)
    if not module_object:
      status_message = 'missing: {0:s}.'.format(module_name)
      return False, status_message

    return self._CheckPythonModuleVersion(
        module_name, module_object, 'sqlite_version', minimum_version, None)
1156093
public static boolean isInstalledOnSDCard(Application app) {
        try {
            String packageName = app.getPackageName();
            PackageInfo info = app.getPackageManager().getPackageInfo(packageName, 0);
            String dir = info.applicationInfo.sourceDir;

            for (String path : INTERNAL_PATH) {
                if (path.equals(dir.substring(0, path.length())))
                    return false;
            }
        } catch (PackageManager.NameNotFoundException exp) {
            throw new IllegalArgumentException(exp);
        }
        return true;
    }
615160
def is_gff_db(db_fname):
    
    if not os.path.isfile(db_fname):
        return False
    if db_fname.endswith(".db"):
        return True
    return False
1108004
private static function isValidDriver(string $driver): bool
    {
        return
            class_exists($driver) &&
            Arr::contains(class_implements($driver), StorageInterface::class);
    }
1327966
def db_exists(name, **client_args):
    '''
    
    '''
    if name in [db['name'] for db in list_dbs(**client_args)]:
        return True

    return False
518409
protected void checkDbSettings() {
        final DatabaseSettings db = settings.getDatabaseSettings();

        if(db == null) {
            throw new RuntimeException("You must specify db settings." +
                    " If you don't need a database, simply leave the section blank.");
        }

        // CHECKSTYLE:OFF conditional complexity too large
        if(db.getPersistenceUnit() != null &&
          (db.getDriver() != null ||
           db.getDialectClass() != null ||
           db.getJdbcUrl() != null ||
           db.getUser() != null ||
           db.getPass() != null)) {
        // CHECKSTYLE:ON
            throw new IllegalStateException("Cannot set persist-unit with any other database settings");
        }
    }
1271542
def check(self, radl):
        """"""

        if not radl.get_system_by_name(self.system):
            raise RADLParseException("Invalid system id '%s'" % self.system, line=self.line)
        if not radl.get_configure_by_name(self.configure):
            raise RADLParseException("Invalid configure id '%s'" % self.configure, line=self.line)
821949
protected function validateDbConnectInstall()
    {
        if ($this->isError()) {
            return null;
        }

        $field = 'database.connect';

        if ($this->isExcluded($field)) {
            return null;
        }

        $settings = $this->getSubmitted('database');
        $result = $this->install->connectDb($settings);

        if ($result === true) {
            return true;
        }

        if (empty($result)) {
            $result = $this->translation->text('Could not connect to database');
        }

        $this->setError($field, (string) $result);
        return false;
    }
502798
protected function isInstalled()
    {
        $disk = Storage::createLocalDriver([
            'driver' => 'local',
            'root'   => app_path(),
        ]);
        
        foreach ($this->files['required'] as $required) {
            if (! $disk->exists(str_replace(['.stub', app_path()], ['.php', ''], $required))) {
                return false;
            }
        }
        
        return true;
    }