// GetDatabaseName returns DB name
330399
func GetDatabaseName() string {
	envValue := os.Getenv(NDDatabaseName)
	if envValue != "" {
		databaseName = envValue
	}
	return databaseName
}
712317
func (obj *Doc) GetDatabases(ctx context.Context, connectionId string) ([]*Database, error) {
	result := &struct {
		Databases []*Database	`json:"qDatabases"`
	} {}
	err := obj.rpc(ctx, "GetDatabases", result, connectionId)
	return result.Databases, err 
}
661754
func (s *GlobalCluster) SetDatabaseName(v string) *GlobalCluster {
	s.DatabaseName = &v
	return s
}
764623
func (s *Partition) SetDatabaseName(v string) *Partition {
	s.DatabaseName = &v
	return s
}
1236098
func (s *UpdateUserDefinedFunctionInput) SetDatabaseName(v string) *UpdateUserDefinedFunctionInput {
	s.DatabaseName = &v
	return s
}
794238
func (s *GetTableVersionInput) SetDatabaseName(v string) *GetTableVersionInput {
	s.DatabaseName = &v
	return s
}
725016
func Get(dbName string) (Db, error) {
	if db, ok := connectionMap[dbName]; ok {
		return db, nil
	}
	return Db{}, errors.New("Database connection not available. Perform 'Setup' first")
}
397842
func (c *IndexedDB) RequestDatabaseNamesWithParams(v *IndexedDBRequestDatabaseNamesParams) ([]string, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.requestDatabaseNames", Params: v})
	if err != nil {
		return nil, err
	}

	var chromeData struct {
		Result struct {
			DatabaseNames []string
		}
	}

	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}

	// test if error first
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}

	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}

	return chromeData.Result.DatabaseNames, nil
}
772086
func (s *Crawler) SetDatabaseName(v string) *Crawler {
	s.DatabaseName = &v
	return s
}
333868
func (s *CreateUserDefinedFunctionInput) SetDatabaseName(v string) *CreateUserDefinedFunctionInput {
	s.DatabaseName = &v
	return s
}
381866
func (s *GetRelationalDatabaseMasterUserPasswordInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMasterUserPasswordInput {
	s.RelationalDatabaseName = &v
	return s
}
270872
func (s *MongoDbSettings) SetDatabaseName(v string) *MongoDbSettings {
	s.DatabaseName = &v
	return s
}
1135762
func (s *RedshiftMetadata) SetDatabaseUserName(v string) *RedshiftMetadata {
	s.DatabaseUserName = &v
	return s
}
103288
func (s *GetRelationalDatabaseInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseInput {
	s.RelationalDatabaseName = &v
	return s
}
649092
func (dbclient *CouchDatabase) GetDatabaseInfo() (*DBInfo, *DBReturn, error) {

	connectURL, err := url.Parse(dbclient.CouchInstance.conf.URL)
	if err != nil {
		logger.Errorf("URL parse error: %s", err)
		return nil, nil, errors.Wrapf(err, "error parsing CouchDB URL: %s", dbclient.CouchInstance.conf.URL)
	}

	//get the number of retries
	maxRetries := dbclient.CouchInstance.conf.MaxRetries

	resp, couchDBReturn, err := dbclient.handleRequest(http.MethodGet, "GetDatabaseInfo", connectURL, nil, "", "", maxRetries, true, nil)
	if err != nil {
		return nil, couchDBReturn, err
	}
	defer closeResponseBody(resp)

	dbResponse := &DBInfo{}
	decodeErr := json.NewDecoder(resp.Body).Decode(&dbResponse)
	if decodeErr != nil {
		return nil, nil, errors.Wrap(decodeErr, "error decoding response body")
	}

	// trace the database info response
	logger.Debugw("GetDatabaseInfo()", "dbResponseJSON", dbResponse)

	return dbResponse, couchDBReturn, nil

}
620528
func (r *Repository) GetName() string {
	if r == nil || r.Name == nil {
		return ""
	}
	return *r.Name
}
313397
func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput {
	s.RelationalDatabaseName = &v
	return s
}