Switches DB type.

@param dbName the database type
@param webapp the webapp name
329679
private void updateDb(String dbName, String webapp) {

        m_mainLayout.removeAllComponents();
        m_setupBean.setDatabase(dbName);
        CmsDbSettingsPanel panel = new CmsDbSettingsPanel(m_setupBean);
        m_panel[0] = panel;
        panel.initFromSetupBean(webapp);
        m_mainLayout.addComponent(panel);
    }
250588
public void deleteDB(String dbName) {
        assertNotEmpty(dbName, "dbName");
        delete(new DatabaseURIHelper(getBaseUri(), dbName).getDatabaseUri());

    }
886494
public void setDatabaseList(java.util.Collection<Database> databaseList) {
        if (databaseList == null) {
            this.databaseList = null;
            return;
        }

        this.databaseList = new java.util.ArrayList<Database>(databaseList);
    }
252098
public static void setJdbcType(String typeName, int typeIndex, JdbcType type)
    {
        setJdbcTypeByName(typeName, type);
        setJdbcTypeByTypesIndex(typeIndex, type);
    }
136220
public void setDBInstances(java.util.Collection<DBInstance> dBInstances) {
        if (dBInstances == null) {
            this.dBInstances = null;
            return;
        }

        this.dBInstances = new com.amazonaws.internal.SdkInternalList<DBInstance>(dBInstances);
    }
1330340
function(db_schema) {
        var diff_msg = schema.difference(db_schema, false, true);
        if (diff_msg.length > 0) {
          goog.log.log(me.logger, goog.log.Level.FINER, diff_msg);
          setDb(null, new ydn.error.ConstraintError('different schema: ' +
              diff_msg));
        } else {
          setDb(db);
        }
      }
865252
public void setDBProperties(Map<String, Object> properties) throws DBException, RemoteException
    {
        BaseTransport transport = this.createProxyTransport(SET_DB_PROPERTIES);
        transport.addParam(PROPERTIES, properties);
        Object strReturn = transport.sendMessageAndGetReply();
        Object objReturn = transport.convertReturnObject(strReturn);
        this.checkDBException(objReturn);
    }
1010426
public function db($dbName) {
		if (!$this->isOpen) return;
		$this->db=$dbName;
		$this->conn1->select_db($dbName);
	}
610812
synchronized public void setDBProperties(Map<String, Object> properties) throws DBException, RemoteException
    {
        m_database.setProperties(properties);
    }
561179
public void extractFieldTypes(DatabaseType databaseType) throws SQLException {
		if (fieldTypes == null) {
			if (fieldConfigs == null) {
				fieldTypes = extractFieldTypes(databaseType, dataClass, tableName);
			} else {
				fieldTypes = convertFieldConfigs(databaseType, tableName, fieldConfigs);
			}
		}
	}
439638
function setupDb( app ) {
  app.setupDb = setupMongoose(
    {
      connection: {
        debug: config.debug,
        uri: {
          database: config.database,
          password: config.password,
          username: config.username
        }
      },
      schemas: [
        {
          'User': User
        }
      ]
    }
  )

  app.setupDb()
    .then(
      function ( db ) {
        app.db = db
      }
    )
    .catch(
      function ( err ) {
        app.db = {
          error: err
        }
      }
    )
}
4097
public function initialize()
	{
		//throw exception if no database type has been set
		if( ! $this->type )
		{
			//Throw exception
			throw new DbException("Invalid database type provided");
			
		}

		//check the type of  database provided returning instance
		//set the parameter to check in switch clause
		switch ($this->type ) 
		{
			case 'mysql':

				return new MySQL($this->options);

				break;
			
			default:

				throw new DbException("Valid database type provided");
				

				break;
		}

	}
602553
function _db(dbConfig, dataPath) {
  if (dbConfig.dialect === 'sqlite') {
    /* eslint-disable-next-line no-param-reassign */
    dbConfig.storage = resolve(dataPath, 'vapid.sqlite');
  }

  return new Database(dbConfig);
}
531038
public static DatabaseType createDatabaseType(String databaseUrl) {
		String dbTypePart = extractDbType(databaseUrl);
		for (DatabaseType databaseType : databaseTypes) {
			if (databaseType.isDatabaseUrlThisType(databaseUrl, dbTypePart)) {
				return databaseType;
			}
		}
		throw new IllegalArgumentException("Unknown database-type url part '" + dbTypePart + "' in: " + databaseUrl);
	}
646143
protected boolean isSQLServerDatabase() throws HandlerException {
        String dbName = determineDatabaseType();
        if (dbName == null) {
            return false;
        }
        return "Microsoft SQL Server".equalsIgnoreCase(dbName);
    }
1322923
def load(dbname, dbmode='a'):
    
    if dbmode == 'w':
        raise AttributeError("dbmode='w' not allowed for load.")
    db = Database(dbname, dbmode=dbmode)

    return db
143239
public void addDatabase(Database database)
    {
        if (m_databaseCollection == null)
            m_databaseCollection = new DatabaseCollection(this);
        m_databaseCollection.addDatabase(database);
    }