亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qsqlresult.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtSql 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.******************************************************************************/#include "qvariant.h"#include "qhash.h"#include "qregexp.h"#include "qsqlerror.h"#include "qsqlfield.h"#include "qsqlrecord.h"#include "qsqlresult.h"#include "qvector.h"#include "qsqldriver.h"struct QHolder {    QHolder(const QString& hldr = QString(), int index = -1): holderName(hldr), holderPos(index) {}    bool operator==(const QHolder& h) const { return h.holderPos == holderPos && h.holderName == holderName; }    bool operator!=(const QHolder& h) const { return h.holderPos != holderPos || h.holderName != holderName; }    QString holderName;    int holderPos;};class QSqlResultPrivate{public:    QSqlResultPrivate(QSqlResult* d)    : q(d), sqldriver(0), idx(QSql::BeforeFirstRow), active(false),      isSel(false), forwardOnly(false), bindCount(0), binds(QSqlResult::PositionalBinding)    {}    void clearValues()    {        values.clear();        bindCount = 0;    }    void resetBindCount()    {        bindCount = 0;    }    void clearIndex()    {        indexes.clear();        holders.clear();        types.clear();    }    void clear()    {        clearValues();        clearIndex();;    }    QString positionalToNamedBinding();    QString namedToPositionalBinding();    QString holderAt(int index) const;public:    QSqlResult* q;    const QSqlDriver* sqldriver;    int idx;    QString sql;    bool active;    bool isSel;    QSqlError error;    bool forwardOnly;    int bindCount;    QSqlResult::BindingSyntax binds;    QString executedQuery;    QHash<int, QSql::ParamType> types;    QVector<QVariant> values;    typedef QHash<QString, int> IndexMap;    IndexMap indexes;    typedef QVector<QHolder> QHolderVector;    QHolderVector holders;};QString QSqlResultPrivate::holderAt(int index) const{    return indexes.key(index);}// return a unique id for bound namesstatic QString qFieldSerial(int i){    ushort arr[] = { ':', 'f', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };    ushort *ptr = &arr[1];    while (i > 0) {        *(++ptr) = 'a' + i % 16;        i >>= 4;    }    return QString::fromUtf16(arr, int(ptr - arr) + 1);}QString QSqlResultPrivate::positionalToNamedBinding(){    QRegExp rx(QLatin1String("'[^']*'|\\?"));    QString q = sql;    int i = 0, cnt = -1;    while ((i = rx.indexIn(q, i)) != -1) {        if (rx.cap(0) == QLatin1String("?"))            q = q.replace(i, 1, qFieldSerial(++cnt));        i += rx.matchedLength();    }    return q;}QString QSqlResultPrivate::namedToPositionalBinding(){    QRegExp rx(QLatin1String("'[^']*'|:([a-zA-Z0-9_]+)"));    QString q = sql;    int i = 0, cnt = -1;    while ((i = rx.indexIn(q, i)) != -1) {        if (rx.cap(1).isEmpty()) {            i += rx.matchedLength();        } else {            // record the index of the placeholder - needed            // for emulating named bindings with ODBC            indexes[rx.cap(0)]= ++cnt;            q.replace(i, rx.matchedLength(), QLatin1String("?"));            ++i;        }    }    return q;}/*!    \class QSqlResult    \brief The QSqlResult class provides an abstract interface for    accessing data from specific SQL databases.    \ingroup database    \module sql    Normally, you would use QSqlQuery instead of QSqlResult, since    QSqlQuery provides a generic wrapper for database-specific    implementations of QSqlResult.    If you are implementing your own SQL driver (by subclassing    QSqlDriver), you will need to provide your own QSqlResult    subclass that implements all the pure virtual functions and other    virtual functions that you need.    \sa QSqlDriver*//*!    \enum QSqlResult::BindingSyntax    This enum type specifies the different syntaxes for specifying    placeholders in prepared queries.    \value PositionalBinding Use the ODBC-style positional syntax, with "?" as placeholders.    \value NamedBinding Use the Oracle-style syntax with named placeholders (e.g., ":id")    \omitvalue BindByPosition    \omitvalue BindByName    \sa bindingSyntax()*//*!    \enum QSqlResult::VirtualHookOperation    \internal*//*!    Creates a QSqlResult using database driver \a db. The object is    initialized to an inactive state.    \sa isActive(), driver()*/QSqlResult::QSqlResult(const QSqlDriver *db){    d = new QSqlResultPrivate(this);    d->sqldriver = db;}/*!    Destroys the object and frees any allocated resources.*/QSqlResult::~QSqlResult(){    delete d;}/*!    Sets the current query for the result to \a query. You must call    reset() to execute the query on the database.    \sa reset(), lastQuery()*/void QSqlResult::setQuery(const QString& query){    d->sql = query;}/*!    Returns the current SQL query text, or an empty string if there    isn't one.    \sa setQuery()*/QString QSqlResult::lastQuery() const{    return d->sql;}/*!    Returns the current (zero-based) row position of the result. May    return the special values QSql::BeforeFirstRow or    QSql::AfterLastRow.    \sa setAt(), isValid()*/int QSqlResult::at() const{    return d->idx;}/*!    Returns true if the result is positioned on a valid record (that    is, the result is not positioned before the first or after the    last record); otherwise returns false.    \sa at()*/bool QSqlResult::isValid() const{    return d->idx != QSql::BeforeFirstRow && d->idx != QSql::AfterLastRow;}/*!    \fn bool QSqlResult::isNull(int index)    Returns true if the field at position \a index in the current row    is null; otherwise returns false.*//*!    Returns true if the result has records to be retrieved; otherwise    returns false.*/bool QSqlResult::isActive() const{    return d->active;}/*!    This function is provided for derived classes to set the    internal (zero-based) row position to \a index.    \sa at()*/void QSqlResult::setAt(int index){    d->idx = index;}/*!    This function is provided for derived classes to indicate whether    or not the current statement is a SQL \c SELECT statement. The \a    select parameter should be true if the statement is a \c SELECT    statement; otherwise it should be false.    \sa isSelect()*/void QSqlResult::setSelect(bool select){    d->isSel = select;}/*!    Returns true if the current result is from a \c SELECT statement;    otherwise returns false.    \sa setSelect()*/bool QSqlResult::isSelect() const{    return d->isSel;}/*!    Returns the driver associated with the result. This is the object    that was passed to the constructor.*/const QSqlDriver *QSqlResult::driver() const{    return d->sqldriver;}/*!    This function is provided for derived classes to set the internal    active state to \a active.    \sa isActive()*/void QSqlResult::setActive(bool active){    if (active && d->executedQuery.isEmpty())        d->executedQuery = d->sql;    d->active = active;}/*!    This function is provided for derived classes to set the last    error to \a error.    \sa lastError()*/void QSqlResult::setLastError(const QSqlError &error){    d->error = error;}/*!    Returns the last error associated with the result.*/QSqlError QSqlResult::lastError() const{    return d->error;}/*!    \fn int QSqlResult::size()    Returns the size of the \c SELECT result, or -1 if it cannot be    determined or if the query is not a \c SELECT statement.    \sa numRowsAffected()*//*!    \fn int QSqlResult::numRowsAffected()    Returns the number of rows affected by the last query executed, or    -1 if it cannot be determined or if the query is a \c SELECT    statement.    \sa size()*//*!    \fn QVariant QSqlResult::data(int index)    Returns the data for field \a index in the current row as    a QVariant. This function is only called if the result is in    an active state and is positioned on a valid record and \a index is    non-negative. Derived classes must reimplement this function and    return the value of field \a index, or QVariant() if it cannot be    determined.*//*!    \fn  bool QSqlResult::reset(const QString &query)    Sets the result to use the SQL statement \a query for subsequent    data retrieval.    Derived classes must reimplement this function and apply the \a    query to the database. This function is only called after the    result is set to an inactive state and is positioned before the    first record of the new result. Derived classes should return    true if the query was successful and ready to be used, or false    otherwise.    \sa setQuery()*//*!    \fn bool QSqlResult::fetch(int index)    Positions the result to an arbitrary (zero-based) row \a index.    This function is only called if the result is in an active state.    Derived classes must reimplement this function and position the    result to the row \a index, and call setAt() with an appropriate    value. Return true to indicate success, or false to signify    failure.    \sa isActive(), fetchFirst(), fetchLast(), fetchNext(), fetchPrevious()*//*!    \fn bool QSqlResult::fetchFirst()    Positions the result to the first record (row 0) in the result.    This function is only called if the result is in an active state.    Derived classes must reimplement this function and position the    result to the first record, and call setAt() with an appropriate    value. Return true to indicate success, or false to signify    failure.    \sa fetch(), fetchLast()*//*!    \fn bool QSqlResult::fetchLast()    Positions the result to the last record (last row) in the result.    This function is only called if the result is in an active state.    Derived classes must reimplement this function and position the    result to the last record, and call setAt() with an appropriate    value. Return true to indicate success, or false to signify    failure.    \sa fetch(), fetchFirst()*//*!    Positions the result to the next available record (row) in the    result.    This function is only called if the result is in an active    state. The default implementation calls fetch() with the next    index. Derived classes can reimplement this function and position    the result to the next record in some other way, and call setAt()    with an appropriate value. Return true to indicate success, or    false to signify failure.    \sa fetch(), fetchPrevious()*/bool QSqlResult::fetchNext(){    return fetch(at() + 1);}/*!    Positions the result to the previous record (row) in the result.    This function is only called if the result is in an active state.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆免费看片| 91女厕偷拍女厕偷拍高清| 国产精品一色哟哟哟| 99精品欧美一区二区蜜桃免费| 欧美视频精品在线观看| 久久久久久久久免费| 伊人婷婷欧美激情| 久久电影网电视剧免费观看| 一本色道综合亚洲| 久久久综合精品| 天天做天天摸天天爽国产一区 | 久久久久久久久久看片| 亚洲一二三四在线观看| 国产福利视频一区二区三区| 91精品国产色综合久久不卡电影| 国产精品国产自产拍在线| 麻豆精品蜜桃视频网站| 欧美午夜免费电影| 亚洲视频在线观看一区| 福利电影一区二区| 久久蜜臀精品av| 精品无人码麻豆乱码1区2区 | 天天综合网天天综合色| 一本久久a久久免费精品不卡| 国产视频一区不卡| 国产一区二区三区视频在线播放| 欧美美女直播网站| 亚洲最大成人网4388xx| 91麻豆自制传媒国产之光| 国产精品久久三| 成人手机在线视频| 国产欧美日韩麻豆91| 国产成人亚洲综合a∨婷婷图片| 日韩欧美成人一区二区| 久久国产生活片100| 69堂亚洲精品首页| 日韩激情在线观看| 欧美一区二区三区影视| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美男女性生活在线直播观看| 性做久久久久久久久| 欧美日韩视频专区在线播放| 亚洲成人福利片| 8x8x8国产精品| 日本视频免费一区| 欧美大片顶级少妇| 狠狠色丁香婷综合久久| 国产婷婷色一区二区三区四区| 国产一区日韩二区欧美三区| 国产情人综合久久777777| 成人av在线资源| 亚洲精品日产精品乱码不卡| 欧美日韩小视频| 美国十次综合导航| 国产色综合久久| 色丁香久综合在线久综合在线观看| 亚洲激情五月婷婷| 日韩一区二区三| 国产福利一区二区三区在线视频| 日韩一区在线免费观看| 在线观看av不卡| 美女视频免费一区| 中文一区二区在线观看| 91美女片黄在线观看91美女| 日韩av一二三| 国产日韩欧美亚洲| 色综合久久天天综合网| 日韩中文字幕av电影| 国产亚洲成av人在线观看导航| www.欧美.com| 日本中文在线一区| 欧美激情一二三区| 51精品秘密在线观看| 成人网页在线观看| 久热成人在线视频| 亚洲欧美国产77777| 欧美成人乱码一区二区三区| 不卡av电影在线播放| 男女视频一区二区| 亚洲色图清纯唯美| 久久综合中文字幕| 欧美日韩极品在线观看一区| 国产成人免费视频一区| 午夜精品一区在线观看| 中文字幕亚洲区| 久久免费偷拍视频| 制服丝袜亚洲网站| 色婷婷久久一区二区三区麻豆| 日本中文字幕一区二区视频 | 捆绑变态av一区二区三区| 国产精品久久久久影院亚瑟| 91精品免费观看| 91久久香蕉国产日韩欧美9色| 麻豆传媒一区二区三区| 亚洲一区二区精品久久av| 国产精品美女久久久久高潮| 欧美美女一区二区在线观看| 日本高清不卡视频| 成人高清av在线| 国产露脸91国语对白| 美脚の诱脚舐め脚责91| 天堂精品中文字幕在线| 亚洲黄色av一区| 国产精品美女久久久久aⅴ国产馆| 欧美一区二区三区视频| 欧美日韩一区二区电影| 91视频免费播放| www.日韩精品| 成人avav影音| 国产成人精品影视| 国产福利一区二区三区视频在线 | 亚洲成人一二三| 亚洲免费观看高清完整版在线观看| 国产日韩高清在线| 国产视频一区二区在线| 国产欧美一区二区精品性色超碰| 日韩欧美aaaaaa| 日韩欧美亚洲一区二区| 欧美一卡二卡三卡| 日韩一二三区视频| 日韩欧美精品在线视频| 欧美大肚乱孕交hd孕妇| 日韩欧美成人午夜| 久久网站热最新地址| 久久综合色播五月| 久久久99久久| 国产片一区二区| 综合分类小说区另类春色亚洲小说欧美| 久久亚洲精华国产精华液 | 成人动漫一区二区在线| 成人高清视频免费观看| 91麻豆6部合集magnet| 欧洲激情一区二区| 91久久精品国产91性色tv| 欧美这里有精品| 91精品国产欧美日韩| 亚洲精品一区二区精华| 久久九九全国免费| 成人免费视频在线观看| 亚洲成a人v欧美综合天堂| 美日韩一区二区| 国产超碰在线一区| 91搞黄在线观看| 日韩欧美国产三级电影视频| 国产日韩欧美一区二区三区综合| 亚洲色图20p| 日韩高清不卡在线| 国产99精品视频| 在线观看免费成人| 欧美mv和日韩mv的网站| 国产精品久久久99| 日本网站在线观看一区二区三区 | 蜜桃视频在线一区| 波多野结衣在线一区| 欧美日韩视频一区二区| 久久久一区二区| 一区二区三区高清| 久久成人久久爱| 91小视频免费看| 欧美第一区第二区| 亚洲综合激情另类小说区| 国产又黄又大久久| 欧美日韩国产综合久久| 国产欧美在线观看一区| 日韩精品1区2区3区| 91丨porny丨国产| 久久影院视频免费| 婷婷国产在线综合| 99久久精品国产一区| 日韩精品专区在线| 亚洲一区二区三区国产| www.亚洲激情.com| 国产亚洲精品中文字幕| 蜜臀av一区二区在线观看| 欧美午夜理伦三级在线观看| 国产精品水嫩水嫩| 国产乱码精品一区二区三区五月婷| 欧美日韩一区三区| 亚洲天堂久久久久久久| 国产精品一二三四| 精品欧美一区二区久久| 亚洲a一区二区| 在线免费观看一区| 综合色中文字幕| www.av精品| 中文字幕欧美国产| 国产一区二区免费在线| 制服丝袜在线91| 日本怡春院一区二区| 欧美精品在线观看一区二区| 亚洲精品免费在线| 色先锋aa成人| 亚洲欧美偷拍另类a∨色屁股| 春色校园综合激情亚洲| xvideos.蜜桃一区二区| 国产伦精品一区二区三区免费迷 | 麻豆传媒一区二区三区| 4438成人网| 久草在线在线精品观看| 欧美一区二区三区四区在线观看|