2 Bacula® - The Network Backup Solution
4 Copyright (C) 2009-2010 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from
7 many others, a complete list can be found in the file AUTHORS.
8 This program is Free Software; you can redistribute it and/or
9 modify it under the terms of version two of the GNU General Public
10 License as published by the Free Software Foundation and included
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 Bacula® is a registered trademark of Kern Sibbald.
24 The licensor of Bacula is the Free Software Foundation Europe
25 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26 Switzerland, email:ftf@fsfeurope.org.
31 EXEC SQL INCLUDE SQLDA;
35 typedef struct ing_timestamp {
45 typedef struct ing_field {
49 unsigned int flags; /* 1 == not null */
52 typedef struct ing_row {
53 IISQLVAR *sqlvar; /* ptr to sqlvar[sqld] for one row */
58 typedef enum ing_status {
62 ING_NO_ROWS_PROCESSED,
67 typedef struct ing_varchar {
72 /* It seems, Bacula needs the complete query result stored in one data structure */
73 typedef struct ing_result {
74 IISQLDA *sqlda; /* descriptor */
80 ING_ROW *act_row; /* just for iterating */
83 typedef struct ing_conn {
91 /* ---Prototypes--- */
92 int INGgetCols(INGconn *dbconn, const char *query, bool transaction);
93 char *INGgetvalue(INGresult *ing_res, int row_number, int column_number);
94 bool INGgetisnull(INGresult *ing_res, int row_number, int column_number);
95 int INGntuples(const INGresult *ing_res);
96 int INGnfields(const INGresult *ing_res);
97 char *INGfname(const INGresult *ing_res, int column_number);
98 short INGftype(const INGresult *ing_res, int column_number);
99 int INGexec(INGconn *dbconn, const char *query, bool transaction);
100 INGresult *INGquery(INGconn *dbconn, const char *query, bool transaction);
101 void INGclear(INGresult *ing_res);
102 void INGcommit(const INGconn *dbconn);
103 INGconn *INGconnectDB(char *dbname, char *user, char *passwd, int session_id);
104 void INGsetDefaultLockingMode(INGconn *dbconn);
105 void INGdisconnectDB(INGconn *dbconn);
106 char *INGerrorMessage(const INGconn *dbconn);
107 char *INGcmdTuples(INGresult *ing_res);
109 #endif /* _MYINGRES_SH */