OpenDNSSEC-enforcer  1.4.9
dbsdef.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2009 Nominet UK. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
19  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
21  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
23  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  */
26 
27 #ifndef KSM_DBEDEF_H
28 #define KSM_DBEDEF_H
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /*+
35  * dbsdef.h - Define Database Status Codes
36  *
37  * Description:
38  * Defines the various status codes that can be returned by the various
39  * DB routines.
40 -*/
41 
42 #define DBS_BASE (65536 + 6144) /* Base of DB status codes */
43 
44 #define DBS_AUTOCOMM (DBS_BASE + 0) /* ERROR: failed to enable autocommit - %s */
45 #define DBS_BUFFEROVF (DBS_BASE + 1) /* ERROR: buffer overflow in %s */
46 #define DBS_CONNFAIL (DBS_BASE + 2) /* ERROR: unable to connect to database - %s */
47 #define DBS_INITFAIL (DBS_BASE + 3) /* ERROR: could not initialize handle to database */
48 #define DBS_INVARG (DBS_BASE + 4) /* ERROR: invalid arguments to %s */
49 #define DBS_INVINDEX (DBS_BASE + 5) /* ERROR: invalid index of %d, maximum index is %d */
50 #define DBS_NORESULT (DBS_BASE + 6) /* ERROR: no result obtained from query where one was expected */
51 #define DBS_NOSUCHROW (DBS_BASE + 7) /* ERROR: unable to get ID of last inserted row - no such row created? */
52 #define DBS_NOTCONERR (DBS_BASE + 8) /* ERROR: not connected to the database */
53 #define DBS_NOTCONN (DBS_BASE + 9) /* INFO: not connected to the database */
54 #define DBS_NOTINT (DBS_BASE + 10) /* ERROR: expected integer result from query, but obtained '%s' instead */
55 #define DBS_SQLFAIL (DBS_BASE + 11) /* ERROR: error executing SQL - %s */
56 #define DBS_STMTALLOC (DBS_BASE + 12) /* ERROR: unable to allocate prepared statement structure */
57 #define DBS_STMTPREP (DBS_BASE + 13) /* ERROR: unable to create prepared statement - %s */
58 #define DBS_TOOMANYROW (DBS_BASE + 14) /* WARNING: query '%s' returned too many rows, excess ignored */
59 #define DBS_UNEXRES (DBS_BASE + 15) /* ERROR: unexpected result from executing SQL statement '%s' */
60 
61 #ifdef __cplusplus
62 };
63 #endif
64 
65 #endif /* KSM_DBEDEF_H */