Drop some needless mappings to identical strings
[LibreOffice.git] / dbaccess / source / filter / hsqldb / columndef.hxx
blob4ac3532a3454abc40fb3d644597f21ecfc528994
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #pragma once
12 #include <rtl/ustring.hxx>
13 #include <vector>
15 namespace dbahsql
17 /// nAutoIncrement: column is auto incremented started with value nAutoIncrement
18 class ColumnDefinition
20 private:
21 OUString m_sName;
22 sal_Int32 m_eType; // css::sdbc::DataType
23 std::vector<sal_Int32> m_aParams;
24 bool m_bPrimaryKey;
25 sal_Int32 m_nAutoIncrement;
26 bool m_bNullable;
27 bool m_bCaseInsensitive;
28 OUString m_sDefaultValue;
30 public:
31 ColumnDefinition(OUString sName, sal_Int32 eType, std::vector<sal_Int32>&& aParams,
32 bool bPrimary = false, sal_Int32 nAutoIncr = -1, bool bNullable = true,
33 bool bCaseInsensitive = false, OUString sDefault = OUString{});
35 OUString const& getName() const { return m_sName; }
36 sal_Int32 getDataType() const { return m_eType; }
37 bool isPrimaryKey() const { return m_bPrimaryKey; }
38 bool isNullable() const { return m_bNullable; }
39 bool isAutoIncremental() const { return m_nAutoIncrement >= 0; }
40 bool isCaseInsensitive() const { return m_bCaseInsensitive; }
41 sal_Int32 getStartValue() const { return m_nAutoIncrement; }
42 const std::vector<sal_Int32>& getParams() const { return m_aParams; }
43 OUString const& getDefault() const { return m_sDefaultValue; }
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */