• QEjdbCollection
  • QEjdbCollection Class

    QEjdbCollection provide a collection with methods to call database funcitons. More...

    Header: #include <QEjdbCollection>
    Since: Qt 1.0

    Public Functions

    QEjdbCollection(const QEjdbCollection & other)
    QEjdbCollection()
    bool create()
    bool drop()
    bool exist()
    QBsonObject load(QBsonOid oid)
    QEjdbResult query(QBsonObject query, QBsonObject hints = QBsonObject())
    bool remove(QBsonOid oid)
    bool save(QBsonObject & object)

    Protected Functions

    QEjdbCollection(QSharedPointer<QEjdbCollectionPrivate> od)
    QEjdbCollection & operator=(const QEjdbCollection & other)

    Detailed Description

    QEjdbCollection provide a collection with methods to call database funcitons.

    Member Function Documentation

    QEjdbCollection::QEjdbCollection(const QEjdbCollection & other)

    Copy constructor.

    QEjdbCollection::QEjdbCollection()

    [protected] QEjdbCollection::QEjdbCollection(QSharedPointer<QEjdbCollectionPrivate> od)

    bool QEjdbCollection::create()

    Creates the collection and return the result.

    bool QEjdbCollection::drop()

    Removes a collection from database and return the result.

    bool QEjdbCollection::exist()

    Returns true if collection exist otherwise false.

    QBsonObject QEjdbCollection::load(QBsonOid oid)

    Loads a bson by oid from the collection and return the result. If no bson found a empty object is returned.

    QEjdbResult QEjdbCollection::query(QBsonObject query, QBsonObject hints = QBsonObject())

    QEjdbCollection::query(QBsonObject query, QBsonObject hints)

    Queries a collection an return the result. For query and hints documentation see http://ejdb.org/doc/ql/ql.html.

    bool QEjdbCollection::remove(QBsonOid oid)

    Remove the bson by oid and return the result.

    bool QEjdbCollection::save(QBsonObject & object)

    Saves the bson object in the collection and return the result. If the bson is saved the object have an oid.

    [protected] QEjdbCollection & QEjdbCollection::operator=(const QEjdbCollection & other)