Logo Search packages:      
Sourcecode: qt4-x11 version File versions

q3sqlselectcursor.h

/****************************************************************************
**
** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
**
** This file is part of the Qt3Support module of the Qt Toolkit.
**
** This file may be used under the terms of the GNU General Public
** License version 2.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file.  Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
** http://www.trolltech.com/products/qt/opensource.html
**
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://www.trolltech.com/products/qt/licensing.html or contact the
** sales department at sales@trolltech.com.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/

#ifndef Q3SQLSELECTCURSOR_H
#define Q3SQLSELECTCURSOR_H

#include <Qt3Support/q3sqlcursor.h>

QT_BEGIN_HEADER

QT_MODULE(Qt3Support)

#ifndef QT_NO_SQL

class Q3SqlSelectCursorPrivate;

00037 class Q_COMPAT_EXPORT Q3SqlSelectCursor : public Q3SqlCursor
{
public:
    Q3SqlSelectCursor(const QString& query = QString(), QSqlDatabase db = QSqlDatabase());
    Q3SqlSelectCursor(const Q3SqlSelectCursor& other);
    ~Q3SqlSelectCursor();
    bool exec(const QString& query);
00044     bool select() { return Q3SqlCursor::select(); }

protected:
00047     QSqlIndex primaryIndex(bool = true) const { return QSqlIndex(); }
00048     QSqlIndex index(const QStringList&) const { return QSqlIndex(); }
00049     QSqlIndex index(const QString&) const { return QSqlIndex(); }
00050     QSqlIndex index(const char*) const { return QSqlIndex(); }
00051     void setPrimaryIndex(const QSqlIndex&) {}
00052     void append(const Q3SqlFieldInfo&) {}
00053     void insert(int, const Q3SqlFieldInfo&) {}
00054     void remove(int) {}
00055     void clear() {}
00056     void setGenerated(const QString&, bool) {}
00057     void setGenerated(int, bool) {}
00058     QSqlRecord*        editBuffer(bool = false) { return 0; }
00059     QSqlRecord*        primeInsert() { return 0; }
00060     QSqlRecord*        primeUpdate() { return 0; }
00061     QSqlRecord*        primeDelete() { return 0; }
00062     int        insert(bool = true) { return 0; }
00063     int        update(bool = true) { return 0; }
00064     int        del(bool = true) { return 0; }
00065     void setMode(int) {}

00067     void setSort(const QSqlIndex&) {}
00068     QSqlIndex sort() const { return QSqlIndex(); }
00069     void setFilter(const QString&) {}
00070     QString filter() const { return QString(); }
00071     void setName(const QString&, bool = true) {}
00072     QString name() const { return QString(); }
00073     QString toString(const QString& = QString(), const QString& = ",") const { return QString(); }
    bool select(const QString &, const QSqlIndex& = QSqlIndex());

private:
    void populateCursor();

    Q3SqlSelectCursorPrivate * d;

protected:
#if !defined(Q_NO_USING_KEYWORD)
    using Q3SqlCursor::update;
#else
    virtual int update(const QString & filter, bool invalidate = true) { return Q3SqlCursor::update(filter, invalidate); }
#endif
};

#endif // QT_NO_SQL

QT_END_HEADER

#endif // Q3SQLSELECTCURSOR_H

Generated by  Doxygen 1.6.0   Back to index