Database operation interfaces of collection space.  
 More...
#include <client.hpp>
|  | 
|  | sdbCollectionSpace () | 
|  | Default constructor. 
 | 
|  | 
|  | ~sdbCollectionSpace () | 
|  | Destructor. 
 | 
|  | 
| INT32 | getCollection (const CHAR *pCollectionName, sdbCollection &collection, BOOLEAN checkExist=TRUE) | 
|  | Get the named collection. 
 | 
|  | 
| INT32 | createCollection (const CHAR *pCollection, const bson::BSONObj &options, sdbCollection &collection) | 
|  | Create the specified collection in current collection space with options. 
 | 
|  | 
| INT32 | createCollection (const CHAR *pCollection, sdbCollection &collection) | 
|  | Create the specified collection in current collection space without sharding key and default ReplSize. 
 | 
|  | 
| INT32 | dropCollection (const CHAR *pCollection) | 
|  | Drop the specified collection in current collection space. 
 | 
|  | 
| INT32 | create () | 
|  | Create a new collection space. 
 | 
|  | 
| INT32 | drop () | 
|  | Drop current collection space. 
 | 
|  | 
| const CHAR * | getCSName () | 
|  | Get the current collection space name. 
 | 
|  | 
| INT32 | renameCollection (const CHAR *oldName, const CHAR *newName, const bson::BSONObj &options=_sdbStaticObject) | 
|  | Rename collection. 
 | 
|  | 
| INT32 | alterCollectionSpace (const bson::BSONObj &options) | 
|  | Alter collection space. 
 | 
|  | 
| INT32 | setDomain (const bson::BSONObj &options) | 
|  | Alter collection space to set domain. 
 | 
|  | 
| INT32 | removeDomain () | 
|  | Alter collection space to remove domain. 
 | 
|  | 
| INT32 | enableCapped () | 
|  | Alter collection space to enable capped. 
 | 
|  | 
| INT32 | disableCapped () | 
|  | Alter collection space to disable capped. 
 | 
|  | 
| INT32 | setAttributes (const bson::BSONObj &options) | 
|  | Alter collection space. 
 | 
|  | 
Database operation interfaces of collection space. 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::alterCollectionSpace | ( | const bson::BSONObj & | options | ) |  |  | inline | 
 
Alter collection space. 
- Parameters
- 
  
    | [in] | options | The options of collection space to be changed, e.g. { "PageSize": 4096, "Domain": "mydomain" }. PageSize     : The page size of the collection space
LobPageSize  : The page size of LOB objects in the collection space
Domain       : The domain which the collection space belongs to
 |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::create | ( |  | ) |  |  | inline | 
 
Create a new collection space. 
- Deprecated:
- This function will be deprecated in SequoiaDB2.x, use sdb::createCollectionSpace instead of it. 
- Return values
- 
  
    | SDB_OK | Operation Success. |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::createCollection | ( | const CHAR * | pCollection, |  
          |  |  | const bson::BSONObj & | options, |  
          |  |  | sdbCollection & | collection |  
          |  | ) |  |  |  | inline | 
 
Create the specified collection in current collection space with options. 
- Parameters
- 
  
    | [in] | pCollection | The collection name |  | [in] | options | The options for creating collection or NULL for not specified any options. Please reference here for more detail. |  | [out] | collection | The return collection object . |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::createCollection | ( | const CHAR * | pCollection, |  
          |  |  | sdbCollection & | collection |  
          |  | ) |  |  |  | inline | 
 
Create the specified collection in current collection space without sharding key and default ReplSize. 
- Parameters
- 
  
    | [in] | pCollection | The collection name. |  | [out] | collection | The return collection object. |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::disableCapped | ( |  | ) |  |  | inline | 
 
Alter collection space to disable capped. 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::drop | ( |  | ) |  |  | inline | 
 
Drop current collection space. 
- Deprecated:
- This function will be deprecated in SequoiaDB2.x, use sdb::dropCollectionSpace instead of it. 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::dropCollection | ( | const CHAR * | pCollection | ) |  |  | inline | 
 
Drop the specified collection in current collection space. 
- Parameters
- 
  
    | [in] | pCollection | The collection name. |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::enableCapped | ( |  | ) |  |  | inline | 
 
Alter collection space to enable capped. 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::getCollection | ( | const CHAR * | pCollectionName, |  
          |  |  | sdbCollection & | collection, |  
          |  |  | BOOLEAN | checkExist = TRUE |  
          |  | ) |  |  |  | inline | 
 
Get the named collection. 
- Parameters
- 
  
    | [in] | pCollectionName | The full name of the collection. |  | [in] | checkExist | Check if the collection exists, default is true. |  | [out] | collection | The return collection object. |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | const CHAR * sdbclient::sdbCollectionSpace::getCSName | ( |  | ) |  |  | inline | 
 
Get the current collection space name. 
- Returns
- The name of current collection space. 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::removeDomain | ( |  | ) |  |  | inline | 
 
Alter collection space to remove domain. 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::renameCollection | ( | const CHAR * | oldName, |  
          |  |  | const CHAR * | newName, |  
          |  |  | const bson::BSONObj & | options = _sdbStaticObject |  
          |  | ) |  |  |  | inline | 
 
Rename collection. 
- Parameters
- 
  
    | [in] | oldName | The old name of collectionSpace. |  | [in] | newName | The new name of collectionSpace. |  | [in] | options | Reserved argument |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::setAttributes | ( | const bson::BSONObj & | options | ) |  |  | inline | 
 
Alter collection space. 
- Parameters
- 
  
    | [in] | options | The options of collection space to be changed, e.g. { "PageSize": 4096, "Domain": "mydomain" }. PageSize     : The page size of the collection space
LobPageSize  : The page size of LOB objects in the collection space
Domain       : The domain which the collection space belongs to
 |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
  
  | 
        
          | INT32 sdbclient::sdbCollectionSpace::setDomain | ( | const bson::BSONObj & | options | ) |  |  | inline | 
 
Alter collection space to set domain. 
- Parameters
- 
  
    | [in] | options | The options of collection space to be changed. Domain       : The domain which the collection space belongs to
 |  
 
- Return values
- 
  
    | SDB_OK | Operation Success |  | Others | Operation Fail |  
 
 
 
      
        
          | sdbclient::sdbCollectionSpace::pCollectionSpace | 
      
 
A pointer of virtual base class _sdbCollectionSpace
Class sdbCollectionSpace is a shell for _sdbCollectionSpace. We use pCollectionSpace to call the methods in class _sdbCollectionSpace. 
 
 
The documentation for this class was generated from the following file: