~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to ext/cppconn/cppconn/resultset_metadata.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
3
 
 
4
The MySQL Connector/C++ is licensed under the terms of the GPLv2
 
5
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
 
6
MySQL Connectors. There are special exceptions to the terms and
 
7
conditions of the GPLv2 as it is applied to this software, see the
 
8
FLOSS License Exception
 
9
<http://www.mysql.com/about/legal/licensing/foss-exception.html>.
 
10
 
 
11
This program is free software; you can redistribute it and/or modify
 
12
it under the terms of the GNU General Public License as published
 
13
by the Free Software Foundation; version 2 of the License.
 
14
 
 
15
This program is distributed in the hope that it will be useful, but
 
16
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
17
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 
18
for more details.
 
19
 
 
20
You should have received a copy of the GNU General Public License along
 
21
with this program; if not, write to the Free Software Foundation, Inc.,
 
22
51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
23
*/
 
24
 
 
25
 
 
26
 
 
27
#ifndef _SQL_RESULTSET_METADATA_H_
 
28
#define _SQL_RESULTSET_METADATA_H_
 
29
 
 
30
#include "sqlstring.h"
 
31
#include "datatype.h"
 
32
 
 
33
namespace sql
 
34
{
 
35
 
 
36
class ResultSetMetaData
 
37
{
 
38
public:
 
39
        enum
 
40
        {
 
41
                columnNoNulls,
 
42
                columnNullable,
 
43
                columnNullableUnknown
 
44
        };
 
45
 
 
46
        virtual SQLString getCatalogName(unsigned int column) = 0;
 
47
 
 
48
        virtual unsigned int getColumnCount() = 0;
 
49
 
 
50
        virtual unsigned int getColumnDisplaySize(unsigned int column) = 0;
 
51
 
 
52
        virtual SQLString getColumnLabel(unsigned int column) = 0;
 
53
 
 
54
        virtual SQLString getColumnName(unsigned int column) = 0;
 
55
 
 
56
        virtual int getColumnType(unsigned int column) = 0;
 
57
 
 
58
        virtual SQLString getColumnTypeName(unsigned int column) = 0;
 
59
 
 
60
        virtual unsigned int getPrecision(unsigned int column) = 0;
 
61
 
 
62
        virtual unsigned int getScale(unsigned int column) = 0;
 
63
 
 
64
        virtual SQLString getSchemaName(unsigned int column) = 0;
 
65
 
 
66
        virtual SQLString getTableName(unsigned int column) = 0;
 
67
 
 
68
        virtual bool isAutoIncrement(unsigned int column) = 0;
 
69
 
 
70
        virtual bool isCaseSensitive(unsigned int column) = 0;
 
71
 
 
72
        virtual bool isCurrency(unsigned int column) = 0;
 
73
 
 
74
        virtual bool isDefinitelyWritable(unsigned int column) = 0;
 
75
 
 
76
        virtual int isNullable(unsigned int column) = 0;
 
77
 
 
78
        virtual bool isNumeric(unsigned int column) = 0;
 
79
 
 
80
        virtual bool isReadOnly(unsigned int column) = 0;
 
81
 
 
82
        virtual bool isSearchable(unsigned int column) = 0;
 
83
 
 
84
        virtual bool isSigned(unsigned int column) = 0;
 
85
 
 
86
        virtual bool isWritable(unsigned int column) = 0;
 
87
 
 
88
        virtual bool isZerofill(unsigned int column) = 0;
 
89
 
 
90
protected:
 
91
        virtual ~ResultSetMetaData() {}
 
92
};
 
93
 
 
94
 
 
95
} /* namespace sql */
 
96
 
 
97
#endif /* _SQL_RESULTSET_METADATA_H_ */