Пример #1
0
        /** \fn DBCollection GetCollection(string collectionName)
         *  \brief Get the named collection
         *  \param collectionName The collection name
         *  \return The DBCollection handle
         *  \exception SequoiaDB.BaseException
         *  \exception System.Exception
         */
        public DBCollection GetCollection(string collectionName)
        {
            // get cl from cache
            string fullName = this.Name + "." + collectionName;

            if (sdb.FetchCache(fullName))
            {
                return(new DBCollection(this, collectionName));
            }
            // get cl from database
            if (IsCollectionExist(collectionName))
            {
                return(new DBCollection(this, collectionName));
            }
            else
            {
                throw new BaseException("SDB_DMS_NOTEXIST");
            }
        }