qsql.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: Nokia Corporation (qt-info@nokia.com)
00006 **
00007 ** This file is part of the QtSql module of the Qt Toolkit.
00008 **
00009 ** $QT_BEGIN_LICENSE:LGPL$
00010 ** Commercial Usage
00011 ** Licensees holding valid Qt Commercial licenses may use this file in
00012 ** accordance with the Qt Commercial License Agreement provided with the
00013 ** Software or, alternatively, in accordance with the terms contained in
00014 ** a written agreement between you and Nokia.
00015 **
00016 ** GNU Lesser General Public License Usage
00017 ** Alternatively, this file may be used under the terms of the GNU Lesser
00018 ** General Public License version 2.1 as published by the Free Software
00019 ** Foundation and appearing in the file LICENSE.LGPL included in the
00020 ** packaging of this file.  Please review the following information to
00021 ** ensure the GNU Lesser General Public License version 2.1 requirements
00022 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
00023 **
00024 ** In addition, as a special exception, Nokia gives you certain additional
00025 ** rights.  These rights are described in the Nokia Qt LGPL Exception
00026 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this module.
00027 **
00028 ** GNU General Public License Usage
00029 ** Alternatively, this file may be used under the terms of the GNU
00030 ** General Public License version 3.0 as published by the Free Software
00031 ** Foundation and appearing in the file LICENSE.GPL included in the
00032 ** packaging of this file.  Please review the following information to
00033 ** ensure the GNU General Public License version 3.0 requirements will be
00034 ** met: http://www.gnu.org/copyleft/gpl.html.
00035 **
00036 ** If you have questions regarding the use of this file, please contact
00037 ** Nokia at qt-info@nokia.com.
00038 ** $QT_END_LICENSE$
00039 **
00040 ****************************************************************************/
00041 
00042 #ifndef QSQL_H
00043 #define QSQL_H
00044 
00045 #include <QtCore/qglobal.h>
00046 
00047 QT_BEGIN_HEADER
00048 
00049 QT_BEGIN_NAMESPACE
00050 
00051 QT_MODULE(Sql)
00052 
00053 namespace QSql
00054 {
00055     enum Location
00056     {
00057         BeforeFirstRow = -1,
00058         AfterLastRow = -2
00059 #ifdef QT3_SUPPORT
00060         , BeforeFirst = BeforeFirstRow,
00061         AfterLast = AfterLastRow
00062 #endif
00063     };
00064 
00065     enum ParamTypeFlag
00066     {
00067         In = 0x00000001,
00068         Out = 0x00000002,
00069         InOut = In | Out,
00070         Binary = 0x00000004
00071     };
00072     Q_DECLARE_FLAGS(ParamType, ParamTypeFlag)
00073 
00074     enum TableType
00075     {
00076         Tables = 0x01,
00077         SystemTables = 0x02,
00078         Views = 0x04,
00079         AllTables = 0xff
00080     };
00081 
00082     enum NumericalPrecisionPolicy
00083     {
00084         LowPrecisionInt32    = 0x01,
00085         LowPrecisionInt64    = 0x02,
00086         LowPrecisionDouble   = 0x04,
00087 
00088         HighPrecision        = 0
00089     };
00090 
00091 #ifdef QT3_SUPPORT
00092     enum Op {
00093         None = -1,
00094         Insert = 0,
00095         Update = 1,
00096         Delete = 2
00097     };
00098 
00099     enum Confirm {
00100         Cancel = -1,
00101         No = 0,
00102         Yes = 1
00103     };
00104 #endif
00105 }
00106 
00107 Q_DECLARE_OPERATORS_FOR_FLAGS(QSql::ParamType)
00108 
00109 QT_END_NAMESPACE
00110 
00111 QT_END_HEADER
00112 
00113 #endif // QSQL_H