summaryrefslogtreecommitdiff
path: root/src/libs/sqlite/sqlitedatabaseinterface.h
blob: af76ee89392fb8218614bb9e37bd78230e972649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <utils/smallstringvector.h>

#include "sqliteglobal.h"

namespace Sqlite {
class DatabaseInterface
{
public:
    virtual void walCheckpointFull() = 0;
    virtual void execute(Utils::SmallStringView sqlStatement) = 0;
    virtual void setUpdateHook(
        void *object,
        void (*)(void *object, int, char const *database, char const *, long long rowId))
        = 0;
    virtual void resetUpdateHook() = 0;
    virtual void applyAndUpdateSessions() = 0;
    virtual void setAttachedTables(const Utils::SmallStringVector &tables) = 0;

protected:
    ~DatabaseInterface() = default;
};
} // namespace Sqlite