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

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

?? qsqlquery.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************** 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 "qsqlquery.h"//#define QT_DEBUG_SQL#include "qatomic.h"#include "qsqlrecord.h"#include "qsqlresult.h"#include "qsqldriver.h"#include "qsqldatabase.h"#include "private/qsqlnulldriver_p.h"#include "qvector.h"#include "qmap.h"class QSqlQueryPrivate{public:    QSqlQueryPrivate(QSqlResult* result);    ~QSqlQueryPrivate();    QAtomic ref;    QSqlResult* sqlResult;    Q_GLOBAL_STATIC_WITH_ARGS(QSqlQueryPrivate, nullQueryPrivate, (0))    Q_GLOBAL_STATIC(QSqlNullDriver, nullDriver)    Q_GLOBAL_STATIC_WITH_ARGS(QSqlNullResult, nullResult, (nullDriver()))    static QSqlQueryPrivate* shared_null();};QSqlQueryPrivate* QSqlQueryPrivate::shared_null(){    QSqlQueryPrivate *null = nullQueryPrivate();    null->ref.ref();    return null;}/*!\internal*/QSqlQueryPrivate::QSqlQueryPrivate(QSqlResult* result): ref(1), sqlResult(result){    if (!sqlResult)        sqlResult = nullResult();}QSqlQueryPrivate::~QSqlQueryPrivate(){    QSqlResult *nr = nullResult();    if (!nr || sqlResult == nr)        return;    delete sqlResult;}/*!    \class QSqlQuery    \brief The QSqlQuery class provides a means of executing and    manipulating SQL statements.    \ingroup database    \ingroup shared    \mainclass    \module sql    QSqlQuery encapsulates the functionality involved in creating,    navigating and retrieving data from SQL queries which are    executed on a \l QSqlDatabase. It can be used to execute DML    (data manipulation language) statements, such as \c SELECT, \c    INSERT, \c UPDATE and \c DELETE, as well as DDL (data definition    language) statements, such as \c{CREATE} \c{TABLE}. It can also    be used to execute database-specific commands which are not    standard SQL (e.g. \c{SET DATESTYLE=ISO} for PostgreSQL).    Successfully executed SQL statements set the query's state to    active; isActive() then returns true. Otherwise the query's state    is set to inactive. In either case, when executing a new SQL    statement, the query is positioned on an invalid record; an    active query must be navigated to a valid record (so that    isValid() returns true) before values can be retrieved.    \target QSqlQuery examples    Navigating records is performed with the following functions:    \list    \o next()    \o previous()    \o first()    \o last()    \o seek()    \endlist    These functions allow the programmer to move forward, backward or    arbitrarily through the records returned by the query. If you only    need to move forward through the results, e.g. using next() or    using seek() with a positive offset, you can use setForwardOnly()    and save a significant amount of memory overhead. Once an active    query is positioned on a valid record, data can be retrieved using    value(). All data is transferred from the SQL backend using    QVariants.    For example:    \quotefromfile snippets/sqldatabase/sqldatabase.cpp    \skipto typical loop    \skipto QSqlQuery query    \printuntil }    To access the data returned by a query, use value(int). Each    field in the data returned by a \c SELECT statement is accessed    by passing the field's position in the statement, starting from    0. This makes using \c{SELECT *} queries inadvisable because the    order of the fields returned is indeterminate.    For the sake of efficiency, there are no functions to access a    field by name (unless you use prepared queries with names, as    explained below). To convert a field name into an index, use    record().\l{QSqlRecord::indexOf()}{indexOf()}, for example:    \skipto field index lookup    \skipto QSqlQuery query    \printuntil }    QSqlQuery supports prepared query execution and the binding of    parameter values to placeholders. Some databases don't support    these features, so for those, Qt emulates the required    functionality. For example, the Oracle and ODBC drivers have    proper prepared query support, and Qt makes use of it; but for    databases that don't have this support, Qt implements the feature    itself, e.g. by replacing placeholders with actual values when a    query is executed. Use numRowsAffected() to find out how many rows    were affected by a non-\c SELECT query, and size() to find how    many were retrieved by a \c SELECT.    Oracle databases identify placeholders by using a colon-name    syntax, e.g \c{:name}. ODBC simply uses \c ? characters. Qt    supports both syntaxes, with the restriction that you can't mix    them in the same query.    You can retrieve the values of all the fields in a single variable    (a map) using boundValues().    \section1 Approaches to Binding Values    Below we present the same example using each of the four    different binding approaches, as well as one example of binding    values to a stored procedure.    \bold{Named binding using named placeholders:}    \skipto named with named    \skipto QSqlQuery    \printuntil exec()    \bold{Positional binding using named placeholders:}    \skipto positional with named    \skipto QSqlQuery    \printuntil exec()    \bold{Binding values using positional placeholders (version 1):}    \skipto positional 1    \skipto QSqlQuery    \printuntil exec()    \bold{Binding values using positional placeholders (version 2):}    \skipto positional 2    \skipto QSqlQuery    \printuntil exec()    \bold{Binding values to a stored procedure:}    This code calls a stored procedure called \c AsciiToInt(), passing    it a character through its in parameter, and taking its result in    the out parameter.    \skipto stored    \skipto QSqlQuery    \printuntil boundValue(    Note that unbound parameters will retain their values.    \sa QSqlDatabase, QSqlQueryModel, QSqlTableModel, QVariant*//*!    Constructs a QSqlQuery object which uses the QSqlResult \a result    to communicate with a database.*/QSqlQuery::QSqlQuery(QSqlResult *result){    d = new QSqlQueryPrivate(result);}/*!    Destroys the object and frees any allocated resources.*/QSqlQuery::~QSqlQuery(){    if (!d->ref.deref())        delete d;}/*!    Constructs a copy of \a other.*/QSqlQuery::QSqlQuery(const QSqlQuery& other){    d = other.d;    d->ref.ref();}/*!    \internal*/static void qInit(QSqlQuery *q, const QString& query, QSqlDatabase db){    QSqlDatabase database = db;    if (!database.isValid())        database = QSqlDatabase::database(QLatin1String(QSqlDatabase::defaultConnection), false);    if (database.isValid()) {        *q = QSqlQuery(database.driver()->createResult());    }    if (!query.isEmpty())        q->exec(query);}/*!    Constructs a QSqlQuery object using the SQL \a query and the    database \a db. If \a db is not specified, the application's    default database is used. If \a query is not an empty string, it    will be executed.    \sa QSqlDatabase*/QSqlQuery::QSqlQuery(const QString& query, QSqlDatabase db){    d = QSqlQueryPrivate::shared_null();    qInit(this, query, db);}/*!    Constructs a QSqlQuery object using the database \a db.    \sa QSqlDatabase*/QSqlQuery::QSqlQuery(QSqlDatabase db){    d = QSqlQueryPrivate::shared_null();    qInit(this, QString(), db);}/*!    Assigns \a other to this object.*/QSqlQuery& QSqlQuery::operator=(const QSqlQuery& other){    qAtomicAssign(d, other.d);    return *this;}/*!    Returns true if the query is active and positioned on a valid    record and the \a field is NULL; otherwise returns false. Note    that for some drivers, isNull() will not return accurate    information until after an attempt is made to retrieve data.    \sa isActive(), isValid(), value()*/bool QSqlQuery::isNull(int field) const{    if (d->sqlResult->isActive() && d->sqlResult->isValid())        return d->sqlResult->isNull(field);    return true;}/*!    Executes the SQL in \a query. Returns true and sets the query    state to active if the query was successful; otherwise returns    false. The \a query string must use syntax appropriate for the    SQL database being queried (for example, standard SQL).    After the query is executed, the query is positioned on an \e    invalid record and must be navigated to a valid record before    data values can be retrieved (for example, using next()).    Note that the last error for this query is reset when exec() is    called.    Example:    \quotefromfile snippets/sqldatabase/sqldatabase.cpp    \skipto QSqlQuery_snippets()    \skipto named with named    \skipto QSqlQuery query    \printuntil exec()    \sa isActive(), isValid(), next(), previous(), first(), last(),        seek()*/bool QSqlQuery::exec(const QString& query){    if (d->ref != 1) {        bool fo = isForwardOnly();        *this = QSqlQuery(driver()->createResult());        setForwardOnly(fo);    } else {        d->sqlResult->clear();        d->sqlResult->setActive(false);        d->sqlResult->setLastError(QSqlError());        d->sqlResult->setAt(QSql::BeforeFirstRow);    }    d->sqlResult->setQuery(query.trimmed());    if (!driver()->isOpen() || driver()->isOpenError()) {        qWarning("QSqlQuery::exec: database not open");        return false;    }    if (query.isEmpty()) {        qWarning("QSqlQuery::exec: empty query");        return false;    }#ifdef QT_DEBUG_SQL    qDebug("\n QSqlQuery: %s", query.toLocal8Bit().constData());#endif    return d->sqlResult->reset(query);}/*!    Returns the value of field \a index in the current record.    The fields are numbered from left to right using the text of the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人一区二区三区在线观看| 91豆麻精品91久久久久久| 一区二区三区成人| 欧美国产日韩在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 久久久久久久综合色一本| 精品99999| 久久久久久久久久久久久久久99 | 性做久久久久久| 一区二区三区在线免费视频| 亚洲色图另类专区| 亚洲午夜影视影院在线观看| 亚洲国产视频a| 免费人成黄页网站在线一区二区| 日韩精品91亚洲二区在线观看| 亚洲国产精品一区二区www| 亚洲国产你懂的| 久久精品国产一区二区| 国产成人一区在线| 色综合色狠狠综合色| 欧美日韩在线播| 日韩精品专区在线影院观看| 国产日韩一级二级三级| 亚洲欧美色图小说| 日韩电影一区二区三区四区| 国产制服丝袜一区| 91视视频在线直接观看在线看网页在线看 | 欧美在线free| 日韩欧美www| 亚洲国产成人午夜在线一区| 国产精品伦理一区二区| 亚洲电影一区二区三区| 久久国产乱子精品免费女| 成人深夜在线观看| 欧美日韩高清影院| 欧美激情一区二区三区| 亚洲国产乱码最新视频 | 91最新地址在线播放| 91精品国产色综合久久不卡电影| 久久久精品国产免大香伊 | 男女激情视频一区| 日本久久精品电影| 久久久久久久综合日本| 日韩精品一级中文字幕精品视频免费观看 | 亚洲精品老司机| 经典三级在线一区| 在线免费视频一区二区| 国产视频不卡一区| 日韩成人一级大片| 色呦呦网站一区| 欧美国产精品v| 狠狠色丁香久久婷婷综合_中 | 国产精选一区二区三区| 欧美四级电影在线观看| 日本一区二区三区在线不卡| 日韩成人一级大片| 欧美亚洲一区二区在线| 国产精品久久久久7777按摩| 久草这里只有精品视频| 欧美日韩一区二区不卡| 日韩毛片一二三区| 国产jizzjizz一区二区| 精品国产91洋老外米糕| 五月天精品一区二区三区| 91蜜桃视频在线| 国产精品理论在线观看| 国产超碰在线一区| 久久久综合网站| 经典三级一区二区| 久久综合久色欧美综合狠狠| 青娱乐精品视频在线| 欧美一区午夜视频在线观看| 亚洲图片欧美一区| 欧美日韩一区二区三区在线| 亚洲精品亚洲人成人网在线播放| 成人国产精品免费观看视频| 久久午夜羞羞影院免费观看| 国产一区二区三区视频在线播放| 精品日韩一区二区| 麻豆精品在线视频| 精品美女一区二区| 国产精品亚洲а∨天堂免在线| 久久综合成人精品亚洲另类欧美 | 一本大道久久a久久精二百| 亚洲免费色视频| 欧美亚洲一区二区在线观看| 丝袜a∨在线一区二区三区不卡| 欧美精品日韩精品| 久久国产精品72免费观看| 久久久噜噜噜久久人人看| 成人性生交大片免费看中文网站| 欧美高清在线视频| 色悠悠亚洲一区二区| 婷婷综合五月天| 精品伦理精品一区| av成人老司机| 午夜一区二区三区在线观看| 日韩欧美一级二级三级| 国产麻豆视频精品| 亚洲免费观看高清在线观看| 欧美日韩mp4| 国产成人小视频| 亚洲国产精品麻豆| 久久久不卡影院| 欧美日韩一区中文字幕| 国产麻豆精品视频| 香蕉久久夜色精品国产使用方法 | 日韩午夜中文字幕| 波多野结衣中文字幕一区 | 国产成人aaa| 香蕉乱码成人久久天堂爱免费| 久久久久久久久99精品| 色婷婷综合久久久| 国产精品白丝av| 午夜精品一区二区三区免费视频| 久久夜色精品国产噜噜av| 欧美亚州韩日在线看免费版国语版| 奇米888四色在线精品| 综合激情成人伊人| 久久亚洲免费视频| 欧美色图激情小说| 不卡视频在线观看| 国产在线精品视频| 午夜影院在线观看欧美| 亚洲视频在线一区观看| 欧美xxxxx裸体时装秀| 欧美在线999| 波多野结衣精品在线| 国产专区综合网| 另类欧美日韩国产在线| 艳妇臀荡乳欲伦亚洲一区| 国产亚洲精品久| 欧美va亚洲va在线观看蝴蝶网| 欧美亚洲综合色| 在线一区二区三区四区五区| 成人av在线观| 国产成人午夜视频| 国产另类ts人妖一区二区| 另类小说综合欧美亚洲| 另类小说综合欧美亚洲| 蜜桃视频一区二区三区| 亚洲sss视频在线视频| 亚洲国产三级在线| 午夜av电影一区| 香蕉乱码成人久久天堂爱免费| 亚洲一区二区综合| 一区二区免费看| 亚洲最大的成人av| 一区二区三区国产豹纹内裤在线| 中文字幕在线观看不卡| 国产精品久久三| 自拍视频在线观看一区二区| 中文字幕日韩一区二区| ...av二区三区久久精品| 中文字幕va一区二区三区| 国产精品免费视频网站| 国产精品久久777777| 一区二区三区毛片| 天堂影院一区二区| 开心九九激情九九欧美日韩精美视频电影| 日韩中文字幕不卡| 裸体在线国模精品偷拍| 激情亚洲综合在线| 国产高清不卡一区二区| 成人av网址在线观看| aaa亚洲精品一二三区| 91热门视频在线观看| 欧美日韩成人在线一区| 欧美一级一级性生活免费录像| 欧美成人aa大片| 中文字幕中文乱码欧美一区二区| 亚洲人成小说网站色在线| 一区二区三区在线高清| 青娱乐精品视频| 国产风韵犹存在线视精品| 91色视频在线| 91精品麻豆日日躁夜夜躁| 久久久另类综合| 一区二区三区视频在线看| 日本欧美加勒比视频| 国产很黄免费观看久久| 欧美中文字幕久久| 26uuu国产一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 蜜臀久久久久久久| 成人国产免费视频| 欧美一区二区三区免费大片| 国产婷婷色一区二区三区在线| 亚洲另类一区二区| 精品一区二区三区日韩| 欧美中文字幕亚洲一区二区va在线 | 99久久99久久综合| 69久久夜色精品国产69蝌蚪网| 国产欧美一区二区三区沐欲| 亚洲一区二区三区视频在线 | 日本道免费精品一区二区三区| 欧美一三区三区四区免费在线看| 欧美日韩一区视频| 国产精品国产三级国产aⅴ原创| 蜜桃视频一区二区三区|