nss: upgrade to release 3.73
[LibreOffice.git] / connectivity / source / drivers / postgresql / pq_statics.hxx
blob017f49b5a6555de4001ff08cc54cc22be078071e
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>
46 #include <cppuhelper/propshlp.hxx>
48 namespace pq_sdbc_driver
51 struct ColumnMetaData
53 ColumnMetaData(
54 const OUString &_columnName,
55 const OUString &_tableName,
56 const OUString &_schemaTableName,
57 const OUString &_typeName,
58 sal_Int32 _type,
59 sal_Int32 _precision,
60 sal_Int32 _scale,
61 bool _isCurrency,
62 bool _isNullable,
63 bool _isAutoIncrement ) :
64 columnName( _columnName ),
65 tableName( _tableName ),
66 schemaTableName( _schemaTableName ),
67 typeName( _typeName ),
68 type( _type ),
69 precision( _precision ),
70 scale( _scale ),
71 isCurrency( _isCurrency ),
72 isNullable( _isNullable ),
73 isAutoIncrement( _isAutoIncrement )
76 OUString columnName;
77 OUString tableName;
78 OUString schemaTableName;
79 OUString typeName;
80 sal_Int32 type;
81 sal_Int32 precision;
82 sal_Int32 scale;
83 bool isCurrency;
84 bool isNullable;
85 bool isAutoIncrement;
88 typedef std::vector< ColumnMetaData > ColumnMetaDataVector;
90 typedef std::unordered_map
92 OUString,
93 sal_Int32
94 > BaseTypeMap;
96 struct ImplementationStatics
98 ImplementationStatics() :
99 pProps(nullptr)
102 OUString implName;
103 css::uno::Sequence< OUString > serviceNames;
104 cppu::IPropertyArrayHelper *pProps;
105 css::uno::Sequence< css::uno::Type > types;
108 struct ReflectionImplementations
110 struct ImplementationStatics table;
111 struct ImplementationStatics tableDescriptor;
112 struct ImplementationStatics column;
113 struct ImplementationStatics columnDescriptor;
114 struct ImplementationStatics key;
115 struct ImplementationStatics keyDescriptor;
116 struct ImplementationStatics keycolumn;
117 struct ImplementationStatics keycolumnDescriptor;
118 struct ImplementationStatics user;
119 struct ImplementationStatics userDescriptor;
120 struct ImplementationStatics view;
121 struct ImplementationStatics viewDescriptor;
122 struct ImplementationStatics index;
123 struct ImplementationStatics indexDescriptor;
124 struct ImplementationStatics indexColumn;
125 struct ImplementationStatics indexColumnDescriptor;
127 struct ImplementationStatics updateableResultSet;
128 struct ImplementationStatics resultSet;
131 const sal_Int32 TABLE_INDEX_CATALOG = 0;
132 const sal_Int32 TABLE_INDEX_SCHEMA = 1;
133 const sal_Int32 TABLE_INDEX_NAME = 2;
134 const sal_Int32 TABLE_INDEX_TYPE = 3;
135 const sal_Int32 TABLE_INDEX_REMARKS = 4;
137 struct Statics
139 OUString SYSTEM_TABLE;
140 OUString TABLE;
141 OUString VIEW;
142 OUString UNKNOWN;
143 OUString YES;
144 OUString NO;
145 OUString NO_NULLS;
146 OUString NULABLE;
147 OUString NULLABLE_UNKNOWN;
148 OUString SELECT;
149 OUString UPDATE;
150 OUString INSERT;
151 OUString DELETE;
152 OUString RULE;
153 OUString REFERENCES;
154 OUString TRIGGER;
155 OUString EXECUTE;
156 OUString USAGE;
157 OUString CREATE;
158 OUString TEMPORARY;
159 OUString INDEX;
160 OUString INDEX_COLUMN;
162 OUString NAME;
163 OUString SCHEMA_NAME;
164 OUString CATALOG_NAME;
165 OUString DESCRIPTION;
166 OUString TYPE;
167 OUString TYPE_NAME;
168 OUString PRIVILEGES;
170 OUString DEFAULT_VALUE;
171 OUString IS_AUTO_INCREMENT;
172 OUString IS_CURRENCY;
173 OUString IS_NULLABLE;
174 OUString IS_ROW_VERSISON;
175 OUString PRECISION;
176 OUString SCALE;
178 OUString cPERCENT;
180 OUString BEGIN;
181 OUString ROLLBACK;
182 OUString COMMIT;
184 OUString KEY;
185 OUString REFERENCED_TABLE;
186 OUString UPDATE_RULE;
187 OUString DELETE_RULE;
188 OUString PRIVATE_COLUMNS;
189 OUString PRIVATE_FOREIGN_COLUMNS;
191 OUString KEY_COLUMN;
192 OUString RELATED_COLUMN;
194 OUString PASSWORD;
195 OUString USER;
197 OUString CURSOR_NAME;
198 OUString ESCAPE_PROCESSING;
199 OUString FETCH_DIRECTION;
200 OUString FETCH_SIZE;
201 OUString IS_BOOKMARKABLE;
202 OUString RESULT_SET_CONCURRENCY;
203 OUString RESULT_SET_TYPE;
205 OUString COMMAND;
206 OUString CHECK_OPTION;
208 OUString TRUE;
209 OUString FALSE;
211 OUString IS_PRIMARY_KEY_INDEX;
212 OUString IS_CLUSTERED;
213 OUString IS_UNIQUE;
214 OUString PRIVATE_COLUMN_INDEXES;
215 OUString HELP_TEXT;
217 OUString CATALOG;
218 OUString IS_ASCENDING;
219 ReflectionImplementations refl;
221 std::vector< OUString > tablesRowNames;
222 std::vector< OUString > columnRowNames;
223 std::vector< OUString > primaryKeyNames;
224 std::vector< OUString > schemaNames;
225 std::vector< OUString > tableTypeNames;
226 std::vector< OUString > typeinfoColumnNames;
227 std::vector< OUString > indexinfoColumnNames;
228 std::vector< OUString > resultSetArrayColumnNames;
229 std::vector< std::vector< css::uno::Any > > tableTypeData;
231 ColumnMetaDataVector typeInfoMetaData;
232 BaseTypeMap baseTypeMap;
233 Statics(){}
234 private:
235 Statics( const Statics & ) = delete;
236 Statics & operator = ( const Statics & ) = delete;
239 Statics & getStatics();
242 #endif
244 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */