SequoiaDB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | List of all members
sdbclient::sdbCollectionSpace Class Reference

Database operation interfaces of collection space. More...

#include <client.hpp>

Public Member Functions

 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.
 

Public Attributes

_sdbCollectionSpace * pCollectionSpace
 

Detailed Description

Database operation interfaces of collection space.

Member Function Documentation

INT32 sdbclient::sdbCollectionSpace::alterCollectionSpace ( const bson::BSONObj &  options)
inline

Alter collection space.

Parameters
[in]optionsThe 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_OKOperation Success
OthersOperation 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_OKOperation Success.
OthersOperation 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]pCollectionThe collection name
[in]optionsThe options for creating collection or NULL for not specified any options. Please reference here for more detail.
[out]collectionThe return collection object .
Return values
SDB_OKOperation Success
OthersOperation 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]pCollectionThe collection name.
[out]collectionThe return collection object.
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::disableCapped ( )
inline

Alter collection space to disable capped.

Return values
SDB_OKOperation Success
OthersOperation 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_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::dropCollection ( const CHAR *  pCollection)
inline

Drop the specified collection in current collection space.

Parameters
[in]pCollectionThe collection name.
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::enableCapped ( )
inline

Alter collection space to enable capped.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::getCollection ( const CHAR *  pCollectionName,
sdbCollection collection,
BOOLEAN  checkExist = TRUE 
)
inline

Get the named collection.

Parameters
[in]pCollectionNameThe full name of the collection.
[in]checkExistCheck if the collection exists, default is true.
[out]collectionThe return collection object.
Return values
SDB_OKOperation Success
OthersOperation 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_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::renameCollection ( const CHAR *  oldName,
const CHAR *  newName,
const bson::BSONObj &  options = _sdbStaticObject 
)
inline

Rename collection.

Parameters
[in]oldNameThe old name of collectionSpace.
[in]newNameThe new name of collectionSpace.
[in]optionsReserved argument
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::setAttributes ( const bson::BSONObj &  options)
inline

Alter collection space.

Parameters
[in]optionsThe 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_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCollectionSpace::setDomain ( const bson::BSONObj &  options)
inline

Alter collection space to set domain.

Parameters
[in]optionsThe options of collection space to be changed.
Domain       : The domain which the collection space belongs to
Return values
SDB_OKOperation Success
OthersOperation Fail

Member Data Documentation

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: