◆ GetCollection< TStorage, TCollection >() [1/2]
Promise< IMongoCollection< TCollection > > Beamable.Server.StorageObjectConnectionProvider.GetCollection< TStorage, TCollection > |
( |
| ) |
|
|
inline |
Gets a MongoDB collection for the mapping class given in TCollection. The collection will share the name of the mapping class. If you need to control the collection name separate from the mapping class name, consider using GetCollection<TStorage,TCollection>(string)
- Template Parameters
-
TStorage | The StorageObject type to get the collection from |
TCollection | The type of collection to fetch |
- Returns
- When the promise completes, you'll have an authorized collection
Implements Beamable.Server.IStorageObjectConnectionProvider.
- Type Constraints
-
TStorage | : | MongoStorageObject | |
TCollection | : | StorageDocument | |
◆ GetCollection< TStorage, TCollection >() [2/2]
async Promise< IMongoCollection< TCollection > > Beamable.Server.StorageObjectConnectionProvider.GetCollection< TStorage, TCollection > |
( |
string |
name | ) |
|
|
inline |
Gets a MongoDB collection by the requested name, and uses the given mapping class. If you don't want to pass in a name, consider using GetCollection<TStorage,TCollection>()
- Parameters
-
name | The name of the collection |
- Template Parameters
-
TStorage | The StorageObject type to get the collection from |
TCollection | The type of the mapping class |
- Returns
- When the promise completes, you'll have an authorized collection
Implements Beamable.Server.IStorageObjectConnectionProvider.
- Type Constraints
-
TStorage | : | MongoStorageObject | |
TCollection | : | StorageDocument | |
◆ GetDatabase< TStorage >()
async Promise< IMongoDatabase > Beamable.Server.StorageObjectConnectionProvider.GetDatabase< TStorage > |
( |
bool |
useCache = true | ) |
|
|
inline |
The documentation for this class was generated from the following file:
- com.beamable.server/SharedRuntime/StorageObjectConnectionProvider.cs