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 * 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 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_STATEMENT_HXX 21 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_STATEMENT_HXX 22 23 #include "StatementCommonBase.hxx" 24 25 #include <cppuhelper/implbase1.hxx> 26 27 namespace connectivity 28 { 29 namespace firebird 30 { 31 32 typedef ::cppu::ImplHelper1< css::sdbc::XStatement > 33 OStatement_Base; 34 35 class OStatement : public OStatementCommonBase, 36 public OStatement_Base, 37 public css::sdbc::XBatchExecution, 38 public css::lang::XServiceInfo 39 { 40 XSQLDA* m_pSqlda; 41 protected: ~OStatement()42 virtual ~OStatement() override {} 43 44 public: 45 // a constructor, which is required for returning objects: OStatement(Connection * _pConnection)46 explicit OStatement( Connection* _pConnection) 47 : OStatementCommonBase( _pConnection), 48 m_pSqlda(nullptr) 49 {} 50 51 virtual void disposeResultSet() override; 52 53 DECLARE_SERVICE_INFO(); 54 55 virtual void SAL_CALL acquire() throw() override; 56 virtual void SAL_CALL release() throw() override; 57 58 // XStatement 59 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL 60 executeQuery(const OUString& sql) override; 61 virtual sal_Int32 SAL_CALL executeUpdate(const OUString& sqlIn) override; 62 virtual sal_Bool SAL_CALL 63 execute(const OUString& sql) override; 64 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL 65 getConnection() override; 66 67 // XBatchExecution - UNSUPPORTED 68 virtual void SAL_CALL addBatch( const OUString& sql ) override; 69 virtual void SAL_CALL clearBatch( ) override; 70 virtual css::uno::Sequence< sal_Int32 > SAL_CALL executeBatch( ) override; 71 72 // XInterface 73 virtual css::uno::Any SAL_CALL 74 queryInterface(const css::uno::Type & rType) override; 75 76 //XTypeProvider 77 virtual css::uno::Sequence< css::uno::Type > SAL_CALL 78 getTypes() override; 79 // OComponentHelper 80 virtual void SAL_CALL disposing() override; 81 82 83 }; 84 } 85 } 86 #endif // INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_STATEMENT_HXX 87 88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 89