File: sqlite-stuff.h

package info (click to toggle)
animals 202601041054Z-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 172 kB
  • sloc: cpp: 815; makefile: 27; sh: 18
file content (30 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download
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
28
29
30
// Copyright (c) 2026 by Philipp Schafft.
// This software comes with NO WARRANTY WHATSOEVER.
//
// 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; version 2 dated June, 1991, or, at your
//    option, any LATER version.
//
//    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.
//
//    You should have received a copy of the GNU General Public License
//    along with this software; see the file COPYING.  If not, write to
//    the Free Software Foundation, 51 Franklin Street, Fifth Floor,
//    Boston, MA 02110-1301, USA.

#include <string>
#include <sqlite3.h>

bool        Write(sqlite3 *db, const std::string &theKey, const std::string &theValue);
bool        Read(sqlite3 *db, const std::string &theKey, std::string &theValue);
sqlite3 *   OpenFile(std::string dbfile);
void        CloseFile(sqlite3 *db);
void        SetLast(sqlite3 * db, const std::string &newKey);
std::string GetLast(sqlite3 * db);
void        SetDbType(sqlite3 *db, const std::string &newType, bool plural);
std::string GetDbType(sqlite3 *db, bool plural);
bool        IsAnimal(sqlite3 *db, const std::string &theKey);