1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "FDatabaseMetaDataResultSetMetaData.hxx"
21 #include <com/sun/star/sdbc/DataType.hpp>
22 #include <com/sun/star/sdbc/ProcedureResult.hpp>
23 #include <com/sun/star/sdbc/ColumnValue.hpp>
25 using namespace connectivity
;
26 using namespace ::com::sun::star::beans
;
27 using namespace ::com::sun::star::uno
;
28 using namespace ::com::sun::star::sdbcx
;
29 using namespace ::com::sun::star::sdbc
;
30 using namespace ::com::sun::star::container
;
31 using namespace ::com::sun::star::lang
;
33 ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
37 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
39 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
40 return (*m_mColumnsIter
).second
.getColumnDisplaySize();
45 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnType( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
47 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
48 return (*m_mColumnsIter
).second
.getColumnType();
52 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnCount( ) throw(SQLException
, RuntimeException
, std::exception
)
54 return m_mColumns
.size();
57 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
59 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
60 return (*m_mColumnsIter
).second
.isCaseSensitive();
64 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
, std::exception
)
69 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
71 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
72 return (*m_mColumnsIter
).second
.getColumnName();
76 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
78 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
79 return (*m_mColumnsIter
).second
.getTableName();
83 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getCatalogName( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
, std::exception
)
88 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
90 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
91 return (*m_mColumnsIter
).second
.getColumnTypeName();
95 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnLabel( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
97 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
98 return (*m_mColumnsIter
).second
.getColumnLabel();
99 return getColumnName(column
);
102 OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
104 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
105 return (*m_mColumnsIter
).second
.getColumnServiceName();
109 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
111 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
112 return (*m_mColumnsIter
).second
.isCurrency();
116 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isAutoIncrement( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
118 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
119 return (*m_mColumnsIter
).second
.isAutoIncrement();
123 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isSigned( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
125 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
126 return (*m_mColumnsIter
).second
.isSigned();
130 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getPrecision( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
132 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
133 return (*m_mColumnsIter
).second
.getPrecision();
137 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getScale( sal_Int32 column
) throw(::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
, std::exception
)
139 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
140 return (*m_mColumnsIter
).second
.getScale();
145 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
147 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
148 return (*m_mColumnsIter
).second
.isNullable();
150 return sal_Int32(false);
153 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isSearchable( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
155 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
156 return (*m_mColumnsIter
).second
.isSearchable();
160 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isReadOnly( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
, std::exception
)
165 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isDefinitelyWritable( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
, std::exception
)
170 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isWritable( sal_Int32 column
) throw(SQLException
, RuntimeException
, std::exception
)
172 return isDefinitelyWritable(column
);
175 void ODatabaseMetaDataResultSetMetaData::setColumnPrivilegesMap()
178 m_mColumns
[5] = OColumn(OUString(),"GRANTOR", ColumnValue::NULLABLE
, 3,3,0, DataType::VARCHAR
);
179 m_mColumns
[6] = OColumn(OUString(),"GRANTEE", ColumnValue::NULLABLE
, 3,3,0, DataType::VARCHAR
);
180 m_mColumns
[7] = OColumn(OUString(),"PRIVILEGE", ColumnValue::NULLABLE
, 3,3,0, DataType::VARCHAR
);
181 m_mColumns
[8] = OColumn(OUString(),"IS_GRANTABLE", ColumnValue::NULLABLE
, 3,3,0, DataType::VARCHAR
);
184 void ODatabaseMetaDataResultSetMetaData::setTableNameMap()
186 m_mColumns
[1] = OColumn(OUString(),"TABLE_CAT", ColumnValue::NULLABLE
, 3,3,0, DataType::VARCHAR
);
187 m_mColumns
[2] = OColumn(OUString(),"TABLE_SCHEM", ColumnValue::NULLABLE
, 3,3,0, DataType::VARCHAR
);
188 m_mColumns
[3] = OColumn(OUString(),"TABLE_NAME", ColumnValue::NO_NULLS
, 3,3,0, DataType::VARCHAR
);
191 void ODatabaseMetaDataResultSetMetaData::setColumnMap()
194 m_mColumns
[4] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS
, 3,3,0, DataType::VARCHAR
);
197 void ODatabaseMetaDataResultSetMetaData::setColumnsMap()
201 m_mColumns
[5] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
202 m_mColumns
[6] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
203 m_mColumns
[7] = OColumn(OUString(),"COLUMN_SIZE", ColumnValue::NO_NULLS
, 3,3,0, DataType::INTEGER
);
204 m_mColumns
[8] = OColumn(OUString(),"BUFFER_LENGTH", ColumnValue::NULLABLE
, 3,3,0, DataType::INTEGER
);
205 m_mColumns
[9] = OColumn(OUString(),"DECIMAL_DIGITS", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
206 m_mColumns
[10] = OColumn(OUString(),"NUM_PREC_RADIX", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
207 m_mColumns
[11] = OColumn(OUString(),"NULLABLE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
208 m_mColumns
[12] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
209 m_mColumns
[13] = OColumn(OUString(),"COLUMN_DEF", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
210 m_mColumns
[14] = OColumn(OUString(),"SQL_DATA_TYPE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
211 m_mColumns
[15] = OColumn(OUString(),"SQL_DATETIME_SUB", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
212 m_mColumns
[16] = OColumn(OUString(),"CHAR_OCTET_LENGTH", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
213 m_mColumns
[17] = OColumn(OUString(),"ORDINAL_POSITION", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
214 m_mColumns
[18] = OColumn(OUString(),"IS_NULLABLE", ColumnValue::NO_NULLS
, 1,1,0, DataType::VARCHAR
);
217 void ODatabaseMetaDataResultSetMetaData::setTablesMap()
220 m_mColumns
[4] = OColumn(OUString(),"TABLE_TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
221 m_mColumns
[5] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
224 void ODatabaseMetaDataResultSetMetaData::setProcedureNameMap()
226 m_mColumns
[1] = OColumn(OUString(),"PROCEDURE_CAT", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
227 m_mColumns
[2] = OColumn(OUString(),"PROCEDURE_SCHEM", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
228 m_mColumns
[3] = OColumn(OUString(),"PROCEDURE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
231 void ODatabaseMetaDataResultSetMetaData::setProcedureColumnsMap()
233 setProcedureNameMap();
234 m_mColumns
[4] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
235 m_mColumns
[5] = OColumn(OUString(),"COLUMN_TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
236 m_mColumns
[6] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
237 m_mColumns
[7] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
238 m_mColumns
[8] = OColumn(OUString(),"PRECISION", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
239 m_mColumns
[9] = OColumn(OUString(),"LENGTH", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
240 m_mColumns
[10] = OColumn(OUString(),"SCALE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
241 m_mColumns
[11] = OColumn(OUString(),"RADIX", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
242 m_mColumns
[12] = OColumn(OUString(),"NULLABLE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
243 m_mColumns
[13] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
246 void ODatabaseMetaDataResultSetMetaData::setPrimaryKeysMap()
249 m_mColumns
[5] = OColumn(OUString(),"KEY_SEQ", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
250 m_mColumns
[6] = OColumn(OUString(),"PK_NAME", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
253 void ODatabaseMetaDataResultSetMetaData::setIndexInfoMap()
256 m_mColumns
[4] = OColumn(OUString(),"NON_UNIQUE", ColumnValue::NO_NULLS
, 1,1,0, DataType::BIT
);
257 m_mColumns
[5] = OColumn(OUString(),"INDEX_QUALIFIER", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
258 m_mColumns
[6] = OColumn(OUString(),"INDEX_NAME", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
259 m_mColumns
[7] = OColumn(OUString(),"TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
260 m_mColumns
[8] = OColumn(OUString(),"ORDINAL_POSITION", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
261 m_mColumns
[9] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
262 m_mColumns
[10] = OColumn(OUString(),"ASC_OR_DESC", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
263 m_mColumns
[11] = OColumn(OUString(),"CARDINALITY", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
264 m_mColumns
[12] = OColumn(OUString(),"PAGES", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
265 m_mColumns
[13] = OColumn(OUString(),"FILTER_CONDITION", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
268 void ODatabaseMetaDataResultSetMetaData::setTablePrivilegesMap()
271 m_mColumns
[4] = OColumn(OUString(),"GRANTOR", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
272 m_mColumns
[5] = OColumn(OUString(),"GRANTEE", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
273 m_mColumns
[6] = OColumn(OUString(),"PRIVILEGE", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
274 m_mColumns
[7] = OColumn(OUString(),"IS_GRANTABLE", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
277 void ODatabaseMetaDataResultSetMetaData::setCrossReferenceMap()
279 m_mColumns
[1] = OColumn(OUString(),"PKTABLE_CAT", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
280 m_mColumns
[2] = OColumn(OUString(),"PKTABLE_SCHEM", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
281 m_mColumns
[3] = OColumn(OUString(),"PKTABLE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
282 m_mColumns
[4] = OColumn(OUString(),"PKCOLUMN_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
283 m_mColumns
[5] = OColumn(OUString(),"FKTABLE_CAT", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
284 m_mColumns
[6] = OColumn(OUString(),"FKTABLE_SCHEM", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
285 m_mColumns
[7] = OColumn(OUString(),"FKTABLE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
286 m_mColumns
[8] = OColumn(OUString(),"FKCOLUMN_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
288 m_mColumns
[9] = OColumn(OUString(),"KEY_SEQ", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
289 m_mColumns
[10] = OColumn(OUString(),"UPDATE_RULE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
290 m_mColumns
[11] = OColumn(OUString(),"DELETE_RULE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
291 m_mColumns
[12] = OColumn(OUString(),"FK_NAME", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
292 m_mColumns
[13] = OColumn(OUString(),"PK_NAME", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
293 m_mColumns
[14] = OColumn(OUString(),"DEFERRABILITY", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
296 void ODatabaseMetaDataResultSetMetaData::setTypeInfoMap()
298 m_mColumns
[1] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
299 m_mColumns
[2] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
300 m_mColumns
[3] = OColumn(OUString(),"PRECISION", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
301 m_mColumns
[4] = OColumn(OUString(),"LITERAL_PREFIX", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
302 m_mColumns
[5] = OColumn(OUString(),"LITERAL_SUFFIX", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
303 m_mColumns
[6] = OColumn(OUString(),"CREATE_PARAMS", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
304 m_mColumns
[7] = OColumn(OUString(),"NULLABLE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
305 m_mColumns
[8] = OColumn(OUString(),"CASE_SENSITIVE", ColumnValue::NO_NULLS
, 1,1,0, DataType::BIT
);
306 m_mColumns
[9] = OColumn(OUString(),"SEARCHABLE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
307 m_mColumns
[10] = OColumn(OUString(),"UNSIGNED_ATTRIBUTE", ColumnValue::NO_NULLS
, 1,1,0, DataType::BIT
);
308 m_mColumns
[11] = OColumn(OUString(),"FIXED_PREC_SCALE", ColumnValue::NO_NULLS
, 1,1,0, DataType::BIT
);
309 m_mColumns
[12] = OColumn(OUString(),"AUTO_INCREMENT", ColumnValue::NO_NULLS
, 1,1,0, DataType::BIT
);
310 m_mColumns
[13] = OColumn(OUString(),"LOCAL_TYPE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
311 m_mColumns
[14] = OColumn(OUString(),"MINIMUM_SCALE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
312 m_mColumns
[15] = OColumn(OUString(),"MAXIMUM_SCALE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
313 m_mColumns
[16] = OColumn(OUString(),"SQL_DATA_TYPE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
314 m_mColumns
[17] = OColumn(OUString(),"SQL_DATETIME_SUB", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
315 m_mColumns
[18] = OColumn(OUString(),"NUM_PREC_RADIX", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
318 void ODatabaseMetaDataResultSetMetaData::setProceduresMap()
320 setProcedureNameMap();
321 m_mColumns
[4] = OColumn(OUString(),"RESERVED1", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
322 m_mColumns
[5] = OColumn(OUString(),"RESERVED2", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
323 m_mColumns
[6] = OColumn(OUString(),"RESERVED3", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
324 m_mColumns
[7] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
325 m_mColumns
[8] = OColumn(OUString(),"PROCEDURE_TYPE", ColumnValue::NO_NULLS
, 1,1,0, DataType::INTEGER
);
328 void ODatabaseMetaDataResultSetMetaData::setTableTypes()
330 m_mColumns
[1] = OColumn(OUString(),"TABLE_TYPE", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
333 void ODatabaseMetaDataResultSetMetaData::setCatalogsMap()
335 m_mColumns
[1] = OColumn(OUString(),"TABLE_CAT", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
338 void ODatabaseMetaDataResultSetMetaData::setSchemasMap()
340 m_mColumns
[1] = OColumn(OUString(),"TABLE_SCHEM", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
343 void ODatabaseMetaDataResultSetMetaData::setVersionColumnsMap()
345 m_mColumns
[1] = OColumn(OUString(),"SCOPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
346 m_mColumns
[2] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
347 m_mColumns
[3] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
348 m_mColumns
[4] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
349 m_mColumns
[5] = OColumn(OUString(),"COLUMN_SIZE", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
350 m_mColumns
[6] = OColumn(OUString(),"BUFFER_LENGTH", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
351 m_mColumns
[7] = OColumn(OUString(),"DECIMAL_DIGITS", ColumnValue::NULLABLE
, 0,0,0, DataType::INTEGER
);
352 m_mColumns
[8] = OColumn(OUString(),"PSEUDO_COLUMN", ColumnValue::NO_NULLS
, 0,0,0, DataType::INTEGER
);
355 void ODatabaseMetaDataResultSetMetaData::setUDTsMap()
357 m_mColumns
[1] = OColumn(OUString(),"TYPE_CAT", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
358 m_mColumns
[2] = OColumn(OUString(),"TYPE_SCHEM", ColumnValue::NULLABLE
, 0,0,0, DataType::VARCHAR
);
359 m_mColumns
[3] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
360 m_mColumns
[4] = OColumn(OUString(),"CLASS_NAME", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
361 m_mColumns
[5] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
362 m_mColumns
[6] = OColumn(OUString(),"REMARKS", ColumnValue::NO_NULLS
, 0,0,0, DataType::VARCHAR
);
365 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */