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/.
12 #include <rtl/ustring.hxx>
17 /// nAutoIncrement: column is auto incremented started with value nAutoIncrement
18 class ColumnDefinition
22 sal_Int32 m_eType
; // css::sdbc::DataType
23 std::vector
<sal_Int32
> m_aParams
;
25 sal_Int32 m_nAutoIncrement
;
27 bool m_bCaseInsensitive
;
28 OUString m_sDefaultValue
;
31 ColumnDefinition(const OUString
& sName
, sal_Int32 eType
, const std::vector
<sal_Int32
>& aParams
,
32 bool bPrimary
= false, sal_Int32 nAutoIncr
= -1, bool bNullable
= true,
33 bool bCaseInsensitive
= false, const 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: */