<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.Container/getDatabaseWithDatabaseScope",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "instm/CloudKit.Container/getDatabaseWithDatabaseScope"
  },
  "title" : "getDatabaseWithDatabaseScope"
}
-->

# getDatabaseWithDatabaseScope

Returns the specified (public, private, or shared) database.

```
CloudKit.Database getDatabaseWithDatabaseScope(
	CloudKit.DatabaseScope databaseScope
);
```

## Parameters

`databaseScope`

Specifies the type of database to return.

## Return Value

The specified database.

## Discussion

This is a convenience method that you can use instead of the specific properties.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)