]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/include/openils/oils_sql.h
Split the cstore servers into several pieces.
[working/Evergreen.git] / Open-ILS / include / openils / oils_sql.h
1 /*
2 Copyright (C) 2010 Equinox Software Inc.
3 Scott McKellar <scott@esilibrary.com>
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 */
15
16 /**
17         @file oils_sql.h
18
19         @brief Utility routines for translating JSON into SQL.
20 */
21
22 #ifndef OILS_SQL_H
23 #define OILS_SQL_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 void oilsSetSQLOptions( const char* module_name, int do_pcrud );
30 void oilsSetDBConnection( dbi_conn conn );
31 int oilsExtendIDL( void );
32 int str_is_true( const char* str );
33 char* buildQuery( osrfMethodContext* ctx, jsonObject* query, int flags );
34
35 int beginTransaction ( osrfMethodContext* );
36 int commitTransaction ( osrfMethodContext* );
37 int rollbackTransaction ( osrfMethodContext* );
38
39 int setSavepoint ( osrfMethodContext* );
40 int releaseSavepoint ( osrfMethodContext* );
41 int rollbackSavepoint ( osrfMethodContext* );
42
43 int doJSONSearch ( osrfMethodContext* ctx );
44
45 int doCreate( osrfMethodContext* ctx );
46 int doRetrieve( osrfMethodContext* ctx );
47 int doUpdate( osrfMethodContext* ctx );
48 int doDelete( osrfMethodContext* ctx );
49 int doSearch( osrfMethodContext* ctx );
50 int doIdList( osrfMethodContext* ctx );
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #endif