LibreOffice Module dbaccess (master) 1
columndef.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
10#pragma once
11
12#include <rtl/ustring.hxx>
13#include <vector>
14
15namespace dbahsql
16{
19{
20private:
21 OUString m_sName;
22 sal_Int32 m_eType; // css::sdbc::DataType
23 std::vector<sal_Int32> m_aParams;
29
30public:
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{});
34
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; }
44};
45}
46
47/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OptionalString sName
nAutoIncrement: column is auto incremented started with value nAutoIncrement
Definition: columndef.hxx:19
bool isAutoIncremental() const
Definition: columndef.hxx:39
bool isPrimaryKey() const
Definition: columndef.hxx:37
sal_Int32 getStartValue() const
Definition: columndef.hxx:41
bool isCaseInsensitive() const
Definition: columndef.hxx:40
const std::vector< sal_Int32 > & getParams() const
Definition: columndef.hxx:42
sal_Int32 getDataType() const
Definition: columndef.hxx:36
OUString const & getDefault() const
Definition: columndef.hxx:43
ColumnDefinition(OUString sName, sal_Int32 eType, std::vector< sal_Int32 > &&aParams, bool bPrimary=false, sal_Int32 nAutoIncr=-1, bool bNullable=true, bool bCaseInsensitive=false, OUString sDefault=OUString{})
Definition: columndef.cxx:29
OUString const & getName() const
Definition: columndef.hxx:35
std::vector< sal_Int32 > m_aParams
Definition: columndef.hxx:23
OUString eType
Definition: generalpage.cxx:78