1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FDatabaseMetaDataResultSetMetaData.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_connectivity.hxx"
33 #include "FDatabaseMetaDataResultSetMetaData.hxx"
34 #include <com/sun/star/sdbc/DataType.hpp>
35 #include <com/sun/star/sdbc/ProcedureResult.hpp>
36 #include <com/sun/star/sdbc/ColumnValue.hpp>
38 using namespace connectivity
;
39 using namespace ::com::sun::star::beans
;
40 using namespace ::com::sun::star::uno
;
41 using namespace ::com::sun::star::sdbcx
;
42 using namespace ::com::sun::star::sdbc
;
43 using namespace ::com::sun::star::container
;
44 using namespace ::com::sun::star::lang
;
46 // -------------------------------------------------------------------------
47 ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
50 // -------------------------------------------------------------------------
51 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal_Int32 column
) throw(SQLException
, RuntimeException
)
53 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
54 return (*m_mColumnsIter
).second
.getColumnDisplaySize();
58 // -------------------------------------------------------------------------
60 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnType( sal_Int32 column
) throw(SQLException
, RuntimeException
)
62 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
63 return (*m_mColumnsIter
).second
.getColumnType();
66 // -------------------------------------------------------------------------
68 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnCount( ) throw(SQLException
, RuntimeException
)
70 return m_mColumns
.size();
72 // -------------------------------------------------------------------------
74 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 column
) throw(SQLException
, RuntimeException
)
76 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
77 return (*m_mColumnsIter
).second
.isCaseSensitive();
80 // -------------------------------------------------------------------------
82 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
)
84 return ::rtl::OUString();
86 // -------------------------------------------------------------------------
88 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 column
) throw(SQLException
, RuntimeException
)
90 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
91 return (*m_mColumnsIter
).second
.getColumnName();
92 return ::rtl::OUString();
94 // -------------------------------------------------------------------------
95 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column
) throw(SQLException
, RuntimeException
)
97 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
98 return (*m_mColumnsIter
).second
.getTableName();
99 return ::rtl::OUString();
101 // -------------------------------------------------------------------------
102 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getCatalogName( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
)
104 return ::rtl::OUString();
106 // -------------------------------------------------------------------------
107 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column
) throw(SQLException
, RuntimeException
)
109 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
110 return (*m_mColumnsIter
).second
.getColumnTypeName();
111 return ::rtl::OUString();
113 // -------------------------------------------------------------------------
114 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnLabel( sal_Int32 column
) throw(SQLException
, RuntimeException
)
116 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
117 return (*m_mColumnsIter
).second
.getColumnLabel();
118 return getColumnName(column
);
120 // -------------------------------------------------------------------------
121 ::rtl::OUString SAL_CALL
ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column
) throw(SQLException
, RuntimeException
)
123 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
124 return (*m_mColumnsIter
).second
.getColumnServiceName();
125 return ::rtl::OUString();
127 // -------------------------------------------------------------------------
129 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 column
) throw(SQLException
, RuntimeException
)
131 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
132 return (*m_mColumnsIter
).second
.isCurrency();
135 // -------------------------------------------------------------------------
137 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isAutoIncrement( sal_Int32 column
) throw(SQLException
, RuntimeException
)
139 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
140 return (*m_mColumnsIter
).second
.isAutoIncrement();
143 // -------------------------------------------------------------------------
146 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isSigned( sal_Int32 column
) throw(SQLException
, RuntimeException
)
148 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
149 return (*m_mColumnsIter
).second
.isSigned();
152 // -------------------------------------------------------------------------
153 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getPrecision( sal_Int32 column
) throw(SQLException
, RuntimeException
)
155 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
156 return (*m_mColumnsIter
).second
.getPrecision();
159 // -------------------------------------------------------------------------
160 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::getScale( sal_Int32 column
) throw(::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
)
162 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
163 return (*m_mColumnsIter
).second
.getScale();
167 // -------------------------------------------------------------------------
169 sal_Int32 SAL_CALL
ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 column
) throw(SQLException
, RuntimeException
)
171 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
172 return (*m_mColumnsIter
).second
.isNullable();
176 // -------------------------------------------------------------------------
178 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isSearchable( sal_Int32 column
) throw(SQLException
, RuntimeException
)
180 if(m_mColumns
.size() && (m_mColumnsIter
= m_mColumns
.find(column
)) != m_mColumns
.end())
181 return (*m_mColumnsIter
).second
.isSearchable();
184 // -------------------------------------------------------------------------
186 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isReadOnly( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
)
188 // if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
189 // return (*m_mColumnsIter).second.isReadOnly();
193 // -------------------------------------------------------------------------
195 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isDefinitelyWritable( sal_Int32
/*column*/ ) throw(SQLException
, RuntimeException
)
197 // if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
198 // return (*m_mColumnsIter).second.isDefinitelyWritable();
203 // -------------------------------------------------------------------------
204 sal_Bool SAL_CALL
ODatabaseMetaDataResultSetMetaData::isWritable( sal_Int32 column
) throw(SQLException
, RuntimeException
)
206 // if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
207 // return (*m_mColumnsIter).second.isWritable();
208 return isDefinitelyWritable(column
);
210 // -------------------------------------------------------------------------
211 void ODatabaseMetaDataResultSetMetaData::setColumnPrivilegesMap()
214 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("GRANTOR"),
215 ColumnValue::NULLABLE
,
218 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("GRANTEE"),
219 ColumnValue::NULLABLE
,
222 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PRIVILEGE"),
223 ColumnValue::NULLABLE
,
226 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("IS_GRANTABLE"),
227 ColumnValue::NULLABLE
,
231 // -----------------------------------------------------------------------------
232 void ODatabaseMetaDataResultSetMetaData::setTableNameMap()
234 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_CAT"),
235 ColumnValue::NULLABLE
,
238 m_mColumns
[2] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_SCHEM"),
239 ColumnValue::NULLABLE
,
242 m_mColumns
[3] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_NAME"),
243 ColumnValue::NO_NULLS
,
247 // -----------------------------------------------------------------------------
248 void ODatabaseMetaDataResultSetMetaData::setColumnMap()
251 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_NAME"),
252 ColumnValue::NO_NULLS
,
256 // -------------------------------------------------------------------------
257 void ODatabaseMetaDataResultSetMetaData::setColumnsMap()
261 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DATA_TYPE"),
262 ColumnValue::NO_NULLS
,
265 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TYPE_NAME"),
266 ColumnValue::NO_NULLS
,
269 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_SIZE"),
270 ColumnValue::NO_NULLS
,
273 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("BUFFER_LENGTH"),
274 ColumnValue::NULLABLE
,
277 m_mColumns
[9] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DECIMAL_DIGITS"),
278 ColumnValue::NO_NULLS
,
281 m_mColumns
[10] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("NUM_PREC_RADIX"),
282 ColumnValue::NO_NULLS
,
285 m_mColumns
[11] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("NULLABLE"),
286 ColumnValue::NO_NULLS
,
289 m_mColumns
[12] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("REMARKS"),
290 ColumnValue::NULLABLE
,
293 m_mColumns
[13] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_DEF"),
294 ColumnValue::NULLABLE
,
297 m_mColumns
[14] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SQL_DATA_TYPE"),
298 ColumnValue::NO_NULLS
,
301 m_mColumns
[15] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SQL_DATETIME_SUB"),
302 ColumnValue::NO_NULLS
,
305 m_mColumns
[16] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("CHAR_OCTET_LENGTH"),
306 ColumnValue::NO_NULLS
,
309 m_mColumns
[17] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("ORDINAL_POSITION"),
310 ColumnValue::NO_NULLS
,
313 m_mColumns
[18] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("IS_NULLABLE"),
314 ColumnValue::NO_NULLS
,
318 // -------------------------------------------------------------------------
319 void ODatabaseMetaDataResultSetMetaData::setTablesMap()
322 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_TYPE"),
323 ColumnValue::NO_NULLS
,
326 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("REMARKS"),
327 ColumnValue::NULLABLE
,
331 // -------------------------------------------------------------------------
332 void ODatabaseMetaDataResultSetMetaData::setProcedureNameMap()
334 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PROCEDURE_CAT"),
335 ColumnValue::NULLABLE
,
338 m_mColumns
[2] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PROCEDURE_SCHEM"),
339 ColumnValue::NULLABLE
,
342 m_mColumns
[3] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PROCEDURE_NAME"),
343 ColumnValue::NO_NULLS
,
347 // -------------------------------------------------------------------------
348 void ODatabaseMetaDataResultSetMetaData::setProcedureColumnsMap()
350 setProcedureNameMap();
351 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_NAME"),
352 ColumnValue::NO_NULLS
,
355 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_TYPE"),
356 ColumnValue::NO_NULLS
,
359 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DATA_TYPE"),
360 ColumnValue::NO_NULLS
,
363 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TYPE_NAME"),
364 ColumnValue::NULLABLE
,
367 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PRECISION"),
368 ColumnValue::NO_NULLS
,
371 m_mColumns
[9] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("LENGTH"),
372 ColumnValue::NO_NULLS
,
375 m_mColumns
[10] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SCALE"),
376 ColumnValue::NO_NULLS
,
379 m_mColumns
[11] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("RADIX"),
380 ColumnValue::NO_NULLS
,
383 m_mColumns
[12] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("NULLABLE"),
384 ColumnValue::NO_NULLS
,
387 m_mColumns
[13] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("REMARKS"),
388 ColumnValue::NULLABLE
,
393 // -------------------------------------------------------------------------
394 void ODatabaseMetaDataResultSetMetaData::setPrimaryKeysMap()
397 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("KEY_SEQ"),
398 ColumnValue::NO_NULLS
,
401 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PK_NAME"),
402 ColumnValue::NULLABLE
,
406 // -------------------------------------------------------------------------
407 void ODatabaseMetaDataResultSetMetaData::setIndexInfoMap()
410 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("NON_UNIQUE"),
411 ColumnValue::NO_NULLS
,
414 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("INDEX_QUALIFIER"),
415 ColumnValue::NULLABLE
,
418 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("INDEX_NAME"),
419 ColumnValue::NULLABLE
,
422 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TYPE"),
423 ColumnValue::NO_NULLS
,
426 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("ORDINAL_POSITION"),
427 ColumnValue::NO_NULLS
,
430 m_mColumns
[9] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_NAME"),
431 ColumnValue::NO_NULLS
,
434 m_mColumns
[10] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("ASC_OR_DESC"),
435 ColumnValue::NULLABLE
,
438 m_mColumns
[11] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("CARDINALITY"),
439 ColumnValue::NO_NULLS
,
442 m_mColumns
[12] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PAGES"),
443 ColumnValue::NO_NULLS
,
446 m_mColumns
[13] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FILTER_CONDITION"),
447 ColumnValue::NULLABLE
,
451 // -------------------------------------------------------------------------
452 void ODatabaseMetaDataResultSetMetaData::setTablePrivilegesMap()
455 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("GRANTOR"),
456 ColumnValue::NULLABLE
,
459 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("GRANTEE"),
460 ColumnValue::NO_NULLS
,
463 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PRIVILEGE"),
464 ColumnValue::NULLABLE
,
467 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("IS_GRANTABLE"),
468 ColumnValue::NULLABLE
,
472 // -------------------------------------------------------------------------
473 void ODatabaseMetaDataResultSetMetaData::setCrossReferenceMap()
475 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PKTABLE_CAT"),
476 ColumnValue::NULLABLE
,
479 m_mColumns
[2] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PKTABLE_SCHEM"),
480 ColumnValue::NULLABLE
,
483 m_mColumns
[3] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PKTABLE_NAME"),
484 ColumnValue::NO_NULLS
,
487 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PKCOLUMN_NAME"),
488 ColumnValue::NO_NULLS
,
491 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FKTABLE_CAT"),
492 ColumnValue::NULLABLE
,
495 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FKTABLE_SCHEM"),
496 ColumnValue::NULLABLE
,
499 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FKTABLE_NAME"),
500 ColumnValue::NO_NULLS
,
503 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FKCOLUMN_NAME"),
504 ColumnValue::NO_NULLS
,
508 m_mColumns
[9] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("KEY_SEQ"),
509 ColumnValue::NO_NULLS
,
512 m_mColumns
[10] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("UPDATE_RULE"),
513 ColumnValue::NO_NULLS
,
516 m_mColumns
[11] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DELETE_RULE"),
517 ColumnValue::NO_NULLS
,
520 m_mColumns
[12] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FK_NAME"),
521 ColumnValue::NULLABLE
,
524 m_mColumns
[13] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PK_NAME"),
525 ColumnValue::NULLABLE
,
528 m_mColumns
[14] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DEFERRABILITY"),
529 ColumnValue::NO_NULLS
,
533 // -------------------------------------------------------------------------
534 void ODatabaseMetaDataResultSetMetaData::setTypeInfoMap()
536 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TYPE_NAME"),
537 ColumnValue::NO_NULLS
,
540 m_mColumns
[2] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DATA_TYPE"),
541 ColumnValue::NO_NULLS
,
544 m_mColumns
[3] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PRECISION"),
545 ColumnValue::NO_NULLS
,
548 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("LITERAL_PREFIX"),
549 ColumnValue::NULLABLE
,
552 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("LITERAL_SUFFIX"),
553 ColumnValue::NULLABLE
,
556 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("CREATE_PARAMS"),
557 ColumnValue::NULLABLE
,
560 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("NULLABLE"),
561 ColumnValue::NO_NULLS
,
564 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("CASE_SENSITIVE"),
565 ColumnValue::NO_NULLS
,
568 m_mColumns
[9] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SEARCHABLE"),
569 ColumnValue::NO_NULLS
,
572 m_mColumns
[10] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("UNSIGNED_ATTRIBUTE"),
573 ColumnValue::NO_NULLS
,
576 m_mColumns
[11] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("FIXED_PREC_SCALE"),
577 ColumnValue::NO_NULLS
,
580 m_mColumns
[12] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("AUTO_INCREMENT"),
581 ColumnValue::NO_NULLS
,
584 m_mColumns
[13] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("LOCAL_TYPE_NAME"),
585 ColumnValue::NO_NULLS
,
588 m_mColumns
[14] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("MINIMUM_SCALE"),
589 ColumnValue::NO_NULLS
,
592 m_mColumns
[15] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("MAXIMUM_SCALE"),
593 ColumnValue::NO_NULLS
,
596 m_mColumns
[16] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SQL_DATA_TYPE"),
597 ColumnValue::NO_NULLS
,
600 m_mColumns
[17] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SQL_DATETIME_SUB"),
601 ColumnValue::NO_NULLS
,
604 m_mColumns
[18] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("NUM_PREC_RADIX"),
605 ColumnValue::NO_NULLS
,
609 // -------------------------------------------------------------------------
610 void ODatabaseMetaDataResultSetMetaData::setProceduresMap()
612 setProcedureNameMap();
613 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("RESERVED1"),
614 ColumnValue::NULLABLE
,
617 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("RESERVED2"),
618 ColumnValue::NULLABLE
,
621 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("RESERVED3"),
622 ColumnValue::NULLABLE
,
625 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("REMARKS"),
626 ColumnValue::NULLABLE
,
629 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PROCEDURE_TYPE"),
630 ColumnValue::NO_NULLS
,
634 // -------------------------------------------------------------------------
635 void ODatabaseMetaDataResultSetMetaData::setTableTypes()
637 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_TYPE"),
638 ColumnValue::NULLABLE
,
642 // -------------------------------------------------------------------------
643 void ODatabaseMetaDataResultSetMetaData::setCatalogsMap()
645 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_CAT"),
646 ColumnValue::NULLABLE
,
650 // -------------------------------------------------------------------------
651 void ODatabaseMetaDataResultSetMetaData::setSchemasMap()
653 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TABLE_SCHEM"),
654 ColumnValue::NULLABLE
,
658 // -------------------------------------------------------------------------
659 void ODatabaseMetaDataResultSetMetaData::setVersionColumnsMap()
661 m_mColumns
[1] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("SCOPE"),
662 ColumnValue::NO_NULLS
,
665 m_mColumns
[2] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_NAME"),
666 ColumnValue::NO_NULLS
,
669 m_mColumns
[3] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DATA_TYPE"),
670 ColumnValue::NO_NULLS
,
673 m_mColumns
[4] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("TYPE_NAME"),
674 ColumnValue::NO_NULLS
,
677 m_mColumns
[5] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("COLUMN_SIZE"),
678 ColumnValue::NO_NULLS
,
681 m_mColumns
[6] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("BUFFER_LENGTH"),
682 ColumnValue::NO_NULLS
,
685 m_mColumns
[7] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("DECIMAL_DIGITS"),
686 ColumnValue::NULLABLE
,
689 m_mColumns
[8] = OColumn(::rtl::OUString(),::rtl::OUString::createFromAscii("PSEUDO_COLUMN"),
690 ColumnValue::NO_NULLS
,