~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/libs/spool/sge_spooling_database.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SGE_SPOOLING_DATABASE_H 
 
2
#define __SGE_SPOOLING_DATABASE_H 
 
3
/*___INFO__MARK_BEGIN__*/
 
4
/*************************************************************************
 
5
 *
 
6
 *  The Contents of this file are made available subject to the terms of
 
7
 *  the Sun Industry Standards Source License Version 1.2
 
8
 *
 
9
 *  Sun Microsystems Inc., March, 2001
 
10
 *
 
11
 *
 
12
 *  Sun Industry Standards Source License Version 1.2
 
13
 *  =================================================
 
14
 *  The contents of this file are subject to the Sun Industry Standards
 
15
 *  Source License Version 1.2 (the "License"); You may not use this file
 
16
 *  except in compliance with the License. You may obtain a copy of the
 
17
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 
18
 *
 
19
 *  Software provided under this License is provided on an "AS IS" basis,
 
20
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 
21
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 
22
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 
23
 *  See the License for the specific provisions governing your rights and
 
24
 *  obligations concerning the Software.
 
25
 *
 
26
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
27
 *
 
28
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
29
 *
 
30
 *   All Rights Reserved.
 
31
 *
 
32
 ************************************************************************/
 
33
/*___INFO__MARK_END__*/       
 
34
 
 
35
#include "cull.h"
 
36
 
 
37
#include "spool/sge_spooling_utilities.h"
 
38
 
 
39
/****** spool/--Spooling-Database ************************************
 
40
*
 
41
*  NAME
 
42
*     database pooling - spooling of data into databases
 
43
*
 
44
*  FUNCTION
 
45
*     The module provides utility functions
 
46
*     for data input/output into databases.
 
47
*
 
48
*  SEE ALSO
 
49
*     spool/postgres/--Spooling-Postgres
 
50
****************************************************************************
 
51
*/
 
52
 
 
53
bool
 
54
spool_database_initialize(lList **answer_list, lListElem *rule);
 
55
 
 
56
bool 
 
57
spool_database_check_version(lList **answer_list, const char *version);
 
58
 
 
59
void *
 
60
spool_database_get_handle(const lListElem *rule);
 
61
bool 
 
62
spool_database_set_handle(const lListElem *rule, void *handle);
 
63
 
 
64
void 
 
65
spool_database_set_history(const lListElem *rule, bool value);
 
66
bool
 
67
spool_database_get_history(const lListElem *rule);
 
68
 
 
69
const char *spool_database_get_table_name(const spooling_field *fields);
 
70
const char *spool_database_get_id_field(const spooling_field *fields);
 
71
const char *spool_database_get_parent_id_field(const spooling_field *fields);
 
72
const char *spool_database_get_valid_field(const spooling_field *fields);
 
73
const char *spool_database_get_created_field(const spooling_field *fields);
 
74
const char *spool_database_get_deleted_field(const spooling_field *fields);
 
75
int spool_database_get_key_nm(const spooling_field *fields);
 
76
 
 
77
spooling_field *
 
78
spool_database_get_fields(const lListElem *rule, sge_object_type type);
 
79
 
 
80
spooling_field *
 
81
spool_database_get_sub_fields(spooling_field *fields, int nm);
 
82
 
 
83
bool 
 
84
spool_database_store_id(lList **answer_list, const spooling_field *fields, 
 
85
                        const char *parent_key, const char *key, 
 
86
                        const char *id, bool tag);
 
87
 
 
88
const char *
 
89
spool_database_get_id(lList **answer_list, const spooling_field *fields, 
 
90
                      const char *parent_key, const char *key, bool tag);
 
91
 
 
92
bool
 
93
spool_database_delete_id(lList **answer_list, 
 
94
                         const spooling_field *fields, 
 
95
                         const char *parent_key, 
 
96
                         const char *key);
 
97
 
 
98
bool 
 
99
spool_database_tag_id(lList **answer_list, const spooling_field *fields, 
 
100
                      const char *parent_key, const char *key, bool value);
 
101
 
 
102
lList *
 
103
spool_database_get_id_list(lList **answer_list, 
 
104
                           const spooling_field *fields, 
 
105
                           const char *parent_key);
 
106
 
 
107
bool 
 
108
spool_database_object_changed(lList **answer_list, const lListElem *object, 
 
109
                              const spooling_field *fields);
 
110
 
 
111
#endif /* __SGE_SPOOLING_DATABASE_H */    
 
112