LibreOffice Module connectivity (master) 1
FDatabaseMetaDataResultSetMetaData.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
24#include <map>
25#include <vector>
26#include "OColumn.hxx"
27
28namespace connectivity
29{
30
31 //************ Class: ODatabaseMetaDataResultSetMetaData
32
33 typedef ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData> ODatabaseMetaResultSetMetaData_BASE;
34
36 {
37 std::map<sal_Int32,connectivity::OColumn> m_mColumns;
38 std::map<sal_Int32,connectivity::OColumn>::const_iterator m_mColumnsIter;
39
40 protected:
41 virtual ~ODatabaseMetaDataResultSetMetaData() override;
42 public:
43 // a Constructor, that is needed for when returning the object is needed:
45 {
46 }
47
48 virtual sal_Int32 SAL_CALL getColumnCount( ) override;
49 virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) override;
50 virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) override;
51 virtual sal_Bool SAL_CALL isSearchable( sal_Int32 column ) override;
52 virtual sal_Bool SAL_CALL isCurrency( sal_Int32 column ) override;
53 virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) override;
54 virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) override;
55 virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) override;
56 virtual OUString SAL_CALL getColumnLabel( sal_Int32 column ) override;
57 virtual OUString SAL_CALL getColumnName( sal_Int32 column ) override;
58 virtual OUString SAL_CALL getSchemaName( sal_Int32 column ) override;
59 virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) override;
60 virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) override;
61 virtual OUString SAL_CALL getTableName( sal_Int32 column ) override;
62 virtual OUString SAL_CALL getCatalogName( sal_Int32 column ) override;
63 virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) override;
64 virtual OUString SAL_CALL getColumnTypeName( sal_Int32 column ) override;
65 virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) override;
66 virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) override;
67 virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) override;
68 virtual OUString SAL_CALL getColumnServiceName( sal_Int32 column ) override;
69
70 // methods to set the right column mapping
72 void setColumnMap();
73 void setColumnsMap();
74 void setTableNameMap();
75 void setTablesMap();
77 void setPrimaryKeysMap();
78 void setIndexInfoMap();
81 void setTypeInfoMap();
83 void setProceduresMap();
84 void setTableTypes();
89 void setCatalogsMap();
90 void setSchemasMap();
91 void setUDTsMap();
92 };
93}
94
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL isReadOnly(sal_Int32 column) override
virtual sal_Bool SAL_CALL isWritable(sal_Int32 column) override
virtual sal_Bool SAL_CALL isSigned(sal_Int32 column) override
virtual OUString SAL_CALL getColumnServiceName(sal_Int32 column) override
virtual sal_Int32 SAL_CALL isNullable(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getColumnDisplaySize(sal_Int32 column) override
virtual OUString SAL_CALL getColumnName(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getPrecision(sal_Int32 column) override
virtual OUString SAL_CALL getColumnTypeName(sal_Int32 column) override
virtual OUString SAL_CALL getSchemaName(sal_Int32 column) override
virtual sal_Bool SAL_CALL isCaseSensitive(sal_Int32 column) override
virtual OUString SAL_CALL getCatalogName(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getColumnType(sal_Int32 column) override
std::map< sal_Int32, connectivity::OColumn >::const_iterator m_mColumnsIter
virtual OUString SAL_CALL getColumnLabel(sal_Int32 column) override
virtual OUString SAL_CALL getTableName(sal_Int32 column) override
virtual sal_Bool SAL_CALL isAutoIncrement(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getScale(sal_Int32 column) override
virtual sal_Bool SAL_CALL isSearchable(sal_Int32 column) override
virtual sal_Bool SAL_CALL isCurrency(sal_Int32 column) override
virtual sal_Bool SAL_CALL isDefinitelyWritable(sal_Int32 column) override
::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData > ODatabaseMetaResultSetMetaData_BASE
unsigned char sal_Bool