LibreOffice Module connectivity (master) 1
Statement.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
23
25#include <com/sun/star/sdbc/XBatchExecution.hpp>
26
28 {
29
30 typedef ::cppu::ImplHelper1< css::sdbc::XStatement >
32
34 public OStatement_Base,
35 public css::sdbc::XBatchExecution,
36 public css::lang::XServiceInfo
37 {
38 XSQLDA* m_pSqlda;
39 protected:
40 virtual ~OStatement() override {}
41
42 public:
43 // a constructor, which is required for returning objects:
44 explicit OStatement( Connection* _pConnection)
45 : OStatementCommonBase( _pConnection),
46 m_pSqlda(nullptr)
47 {}
48
49 virtual void disposeResultSet() override;
50
52
53 virtual void SAL_CALL acquire() noexcept override;
54 virtual void SAL_CALL release() noexcept override;
55
56 // XStatement
57 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL
58 executeQuery(const OUString& sql) override;
59 virtual sal_Int32 SAL_CALL executeUpdate(const OUString& sqlIn) override;
60 virtual sal_Bool SAL_CALL
61 execute(const OUString& sql) override;
62 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
63 getConnection() override;
64
65 // XBatchExecution - UNSUPPORTED
66 virtual void SAL_CALL addBatch( const OUString& sql ) override;
67 virtual void SAL_CALL clearBatch( ) override;
68 virtual css::uno::Sequence< sal_Int32 > SAL_CALL executeBatch( ) override;
69
70 // XInterface
71 virtual css::uno::Any SAL_CALL
72 queryInterface(const css::uno::Type & rType) override;
73
74 //XTypeProvider
75 virtual css::uno::Sequence< css::uno::Type > SAL_CALL
76 getTypes() override;
77 // OComponentHelper
78 virtual void SAL_CALL disposing() override;
79
80 };
81
82}
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
virtual void SAL_CALL addBatch(const OUString &sql) override
Definition: Statement.cxx:45
virtual void disposeResultSet() override
Definition: Statement.cxx:70
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL executeQuery(const OUString &sql) override
Definition: Statement.cxx:94
virtual ~OStatement() override
Definition: Statement.hxx:40
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection() override
Definition: Statement.cxx:141
virtual void SAL_CALL release() noexcept override
Definition: Statement.cxx:65
virtual void SAL_CALL disposing() override
Definition: Statement.cxx:165
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual sal_Bool SAL_CALL execute(const OUString &sql) override
Definition: Statement.cxx:134
virtual void SAL_CALL acquire() noexcept override
Definition: Statement.cxx:60
virtual void SAL_CALL clearBatch() override
Definition: Statement.cxx:49
OStatement(Connection *_pConnection)
Definition: Statement.hxx:44
virtual sal_Int32 SAL_CALL executeUpdate(const OUString &sqlIn) override
Definition: Statement.cxx:87
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: Statement.cxx:159
virtual css::uno::Sequence< sal_Int32 > SAL_CALL executeBatch() override
Definition: Statement.cxx:53
Type
::cppu::ImplHelper1< css::sdbc::XStatement > OStatement_Base
Definition: Statement.hxx:31
unsigned char sal_Bool