/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
sal_Int32 m_eTypeKind; // the database type bool m_bNull : 1; // value is null bool m_bBound : 1; // is bound bool m_bModified : 1; // value was changed bool m_bSigned : 1; // value is signed
ORowSetValue& operator=(const OUString& _rRH); // the type isn't set it will be set to VARCHAR if the type is different change it
ORowSetValue& operator=(const css::uno::Sequence<sal_Int8>& _rRH); // with the possibility to save an any for bookmarks
ORowSetValue& operator=(const css::uno::Any& _rAny);
OUString getString() const; // makes an automatic conversion if type isn't a string
css::util::Date getDate() const;
css::util::Time getTime() const;
css::util::DateTime getDateTime() const;
css::uno::Sequence<sal_Int8> getSequence() const; // only use for anys const css::uno::Any& getAny() const { return *static_cast<css::uno::Any*>(m_aValue.m_pValue); }
css::uno::Any makeAny() const;
/** fetches a single value out of the row @param _nPos the current column position @param _nType the type of the current column @param _xRow the row where to fetch the data from
*/ void fill(sal_Int32 _nPos,
sal_Int32 _nType, const css::uno::Reference< css::sdbc::XRow>& _xRow);
/** fetches a single value out of the row @param _nPos the current column position @param _nType the type of the current column @param _bNullable if true then it will be checked if the result could be NULL, otherwise not. @param _xRow the row where to fetch the data from
*/ void fill(sal_Int32 _nPos,
sal_Int32 _nType, bool _bNullable, const css::uno::Reference< css::sdbc::XRow>& _xRow);
/// ORowSetValueDecorator decorates an ORowSetValue so the value is "refcounted" class OOO_DLLPUBLIC_DBTOOLS ORowSetValueDecorator final : public ::salhelper::SimpleReferenceObject
{
ORowSetValue m_aValue; // my own value public:
ORowSetValueDecorator(){m_aValue.setBound(true);}
ORowSetValueDecorator(ORowSetValue _aValue) : m_aValue(std::move(_aValue)){m_aValue.setBound(true);}
ORowSetValueDecorator& operator=(const ORowSetValue& _aValue);
/// TSetBound is a functor to set the bound value with e.q. for_each call struct OOO_DLLPUBLIC_DBTOOLS TSetBound
{ bool m_bBound;
TSetBound(bool _bBound) : m_bBound(_bBound){} voidoperator()(ORowSetValue& _rValue) const { _rValue.setBound(m_bBound); }
};
/// TSetBound is a functor to set the bound value with e.q. for_each call struct OOO_DLLPUBLIC_DBTOOLS TSetRefBound
{ bool m_bBound;
TSetRefBound(bool _bBound) : m_bBound(_bBound){} voidoperator()(ORowSetValueDecoratorRef const & _rValue) const { _rValue->setBound(m_bBound); }
};
// Vector for file based rows
template< class VectorVal > class ODeleteVector : public connectivity::ORowVector< VectorVal >
{ bool m_bDeleted; public:
ODeleteVector() : connectivity::ORowVector< VectorVal >() ,m_bDeleted(false) {}
ODeleteVector(size_t _st) : connectivity::ORowVector< VectorVal >(_st) ,m_bDeleted(false) {}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.