MysqlCatalogueSchema.hpp 1.81 KB
Newer Older
Tao Lin's avatar
Tao Lin committed
1
/*
2
 * @project        The CERN Tape Archive (CTA)
3
 * @copyright      Copyright(C) 2015-2021 CERN
4
5
6
7
 * @license        This program is free software: you can redistribute it and/or modify
 *                 it under the terms of the GNU General Public License as published by
 *                 the Free Software Foundation, either version 3 of the License, or
 *                 (at your option) any later version.
Tao Lin's avatar
Tao Lin committed
8
 *
9
10
11
12
 *                 This program is distributed in the hope that it will be useful,
 *                 but WITHOUT ANY WARRANTY; without even the implied warranty of
 *                 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *                 GNU General Public License for more details.
Tao Lin's avatar
Tao Lin committed
13
 *
14
15
 *                 You should have received a copy of the GNU General Public License
 *                 along with this program.  If not, see <http://www.gnu.org/licenses/>.
Tao Lin's avatar
Tao Lin committed
16
17
18
19
 */

#pragma once

20
21
#include "CatalogueSchema.hpp"

Tao Lin's avatar
Tao Lin committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <string>
#include <vector>

namespace cta {
namespace catalogue {

/**
 * Structure containing the SQL to create the schema of the CTA catalogue
 * database in an SQLite database.
 *
 * The CMakeLists.txt file of this directory instructs cmake to generate
 * MysqlCatalogueSchema.cpp from:
 *   - MysqlCatalogueSchema.before_SQL.cpp
 *   - sqlite_catalogue_schema.sql
 *
 * The MysqlCatalogueSchema.before_SQL.cpp file is not compilable and is therefore
 * difficult for Integrated Developent Environments (IDEs) to handle.
 *
 * The purpose of this class is to help IDEs by isolating the "non-compilable"
 * issues into a small cpp file.
 */
43
struct MysqlCatalogueSchema: public CatalogueSchema {
Tao Lin's avatar
Tao Lin committed
44
45
46
47
48
49
50
51
52
53
54
55
56
  /**
   * Constructor.
   */
  MysqlCatalogueSchema();

  /**
   * Return a list of trigger commands
   */
  std::vector<std::string> triggers();
};

} // namespace catalogue
} // namespace cta