bump product version to 6.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / postgresql / pq_statics.hxx
blob324889b72100f6221cb3dc27e6eb11b1cfc93122
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * Effective License of whole file:
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software Foundation.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
25 * Copyright: 2000 by Sun Microsystems, Inc.
27 * Contributor(s): Joerg Budischewski
29 * All parts contributed on or after August 2011:
31 * This Source Code Form is subject to the terms of the Mozilla Public
32 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
35 ************************************************************************/
37 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATICS_HXX
38 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATICS_HXX
40 #include <unordered_map>
41 #include <vector>
43 #include <com/sun/star/uno/Any.hxx>
44 #include <com/sun/star/uno/Sequence.hxx>
45 #include <com/sun/star/sdbc/DataType.hpp>
47 #include <cppuhelper/propshlp.hxx>
49 namespace pq_sdbc_driver
52 struct ColumnMetaData
54 ColumnMetaData(
55 const OUString &_columnName,
56 const OUString &_tableName,
57 const OUString &_schemaTableName,
58 const OUString &_typeName,
59 sal_Int32 _type,
60 sal_Int32 _precision,
61 sal_Int32 _scale,
62 bool _isCurrency,
63 bool _isNullable,
64 bool _isAutoIncrement ) :
65 columnName( _columnName ),
66 tableName( _tableName ),
67 schemaTableName( _schemaTableName ),
68 typeName( _typeName ),
69 type( _type ),
70 precision( _precision ),
71 scale( _scale ),
72 isCurrency( _isCurrency ),
73 isNullable( _isNullable ),
74 isAutoIncrement( _isAutoIncrement )
77 OUString columnName;
78 OUString tableName;
79 OUString schemaTableName;
80 OUString typeName;
81 sal_Int32 type;
82 sal_Int32 precision;
83 sal_Int32 scale;
84 bool isCurrency;
85 bool isNullable;
86 bool isAutoIncrement;
89 typedef std::vector< ColumnMetaData > ColumnMetaDataVector;
91 typedef std::unordered_map
93 OUString,
94 sal_Int32
95 > BaseTypeMap;
97 struct ImplementationStatics
99 ImplementationStatics() :
100 pProps(nullptr)
103 OUString implName;
104 css::uno::Sequence< OUString > serviceNames;
105 cppu::IPropertyArrayHelper *pProps;
106 css::uno::Sequence< css::uno::Type > types;
109 struct ReflectionImplementations
111 struct ImplementationStatics table;
112 struct ImplementationStatics tableDescriptor;
113 struct ImplementationStatics column;
114 struct ImplementationStatics columnDescriptor;
115 struct ImplementationStatics key;
116 struct ImplementationStatics keyDescriptor;
117 struct ImplementationStatics keycolumn;
118 struct ImplementationStatics keycolumnDescriptor;
119 struct ImplementationStatics user;
120 struct ImplementationStatics userDescriptor;
121 struct ImplementationStatics view;
122 struct ImplementationStatics viewDescriptor;
123 struct ImplementationStatics index;
124 struct ImplementationStatics indexDescriptor;
125 struct ImplementationStatics indexColumn;
126 struct ImplementationStatics indexColumnDescriptor;
128 struct ImplementationStatics updateableResultSet;
129 struct ImplementationStatics resultSet;
132 static const sal_Int32 TABLE_INDEX_CATALOG = 0;
133 static const sal_Int32 TABLE_INDEX_SCHEMA = 1;
134 static const sal_Int32 TABLE_INDEX_NAME = 2;
135 static const sal_Int32 TABLE_INDEX_TYPE = 3;
136 static const sal_Int32 TABLE_INDEX_REMARKS = 4;
138 struct Statics
140 OUString SYSTEM_TABLE;
141 OUString TABLE;
142 OUString VIEW;
143 OUString UNKNOWN;
144 OUString YES;
145 OUString NO;
146 OUString NO_NULLS;
147 OUString NULABLE;
148 OUString NULLABLE_UNKNOWN;
149 OUString SELECT;
150 OUString UPDATE;
151 OUString INSERT;
152 OUString DELETE;
153 OUString RULE;
154 OUString REFERENCES;
155 OUString TRIGGER;
156 OUString EXECUTE;
157 OUString USAGE;
158 OUString CREATE;
159 OUString TEMPORARY;
160 OUString INDEX;
161 OUString INDEX_COLUMN;
163 OUString NAME;
164 OUString SCHEMA_NAME;
165 OUString CATALOG_NAME;
166 OUString DESCRIPTION;
167 OUString TYPE;
168 OUString TYPE_NAME;
169 OUString PRIVILEGES;
171 OUString DEFAULT_VALUE;
172 OUString IS_AUTO_INCREMENT;
173 OUString IS_CURRENCY;
174 OUString IS_NULLABLE;
175 OUString IS_ROW_VERSISON;
176 OUString PRECISION;
177 OUString SCALE;
179 OUString cPERCENT;
181 OUString BEGIN;
182 OUString ROLLBACK;
183 OUString COMMIT;
185 OUString KEY;
186 OUString REFERENCED_TABLE;
187 OUString UPDATE_RULE;
188 OUString DELETE_RULE;
189 OUString PRIVATE_COLUMNS;
190 OUString PRIVATE_FOREIGN_COLUMNS;
192 OUString KEY_COLUMN;
193 OUString RELATED_COLUMN;
195 OUString PASSWORD;
196 OUString USER;
198 OUString CURSOR_NAME;
199 OUString ESCAPE_PROCESSING;
200 OUString FETCH_DIRECTION;
201 OUString FETCH_SIZE;
202 OUString IS_BOOKMARKABLE;
203 OUString RESULT_SET_CONCURRENCY;
204 OUString RESULT_SET_TYPE;
206 OUString COMMAND;
207 OUString CHECK_OPTION;
209 OUString TRUE;
210 OUString FALSE;
212 OUString IS_PRIMARY_KEY_INDEX;
213 OUString IS_CLUSTERED;
214 OUString IS_UNIQUE;
215 OUString PRIVATE_COLUMN_INDEXES;
216 OUString HELP_TEXT;
218 OUString CATALOG;
219 OUString IS_ASCENDING;
220 ReflectionImplementations refl;
222 std::vector< OUString > tablesRowNames;
223 std::vector< OUString > columnRowNames;
224 std::vector< OUString > primaryKeyNames;
225 std::vector< OUString > schemaNames;
226 std::vector< OUString > tableTypeNames;
227 std::vector< OUString > typeinfoColumnNames;
228 std::vector< OUString > indexinfoColumnNames;
229 std::vector< OUString > resultSetArrayColumnNames;
230 std::vector< std::vector< css::uno::Any > > tableTypeData;
232 ColumnMetaDataVector typeInfoMetaData;
233 BaseTypeMap baseTypeMap;
234 Statics(){}
235 private:
236 Statics( const Statics & ) = delete;
237 Statics & operator = ( const Statics & ) = delete;
240 Statics & getStatics();
243 #endif
245 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */