attr.h

Go to the documentation of this file.
00001 /*
00002  * DB-ALLe - Archive for punctual meteorological data
00003  *
00004  * Copyright (C) 2005,2006  ARPA-SIM <urpsim@smr.arpa.emr.it>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00018  *
00019  * Author: Enrico Zini <enrico@enricozini.com>
00020  */
00021 
00022 #ifndef DBALLE_DB_ATTR_H
00023 #define DBALLE_DB_ATTR_H
00024 
00025 #ifdef  __cplusplus
00026 extern "C" {
00027 #endif
00028 
00035 #include <dballe/db/internals.h>
00036 #include <dballe/core/var.h>
00037 
00038 struct _dba_db;
00039     
00043 struct _dba_db_attr
00044 {
00046     struct _dba_db* db;
00048     SQLHSTMT sstm;
00050     SQLHSTMT istm;
00052     SQLHSTMT rstm;
00053 
00055     DBALLE_SQL_C_SINT_TYPE id_context;
00057     dba_varcode id_var;
00059     dba_varcode type;
00061     char value[255];
00063     SQLLEN value_ind;
00064 };
00066 typedef struct _dba_db_attr* dba_db_attr;
00067 
00078 dba_err dba_db_attr_create(dba_db db, dba_db_attr* ins);
00079 
00086 void dba_db_attr_delete(dba_db_attr ins);
00087 
00096 void dba_db_attr_set(dba_db_attr ins, dba_var var);
00097 
00106 void dba_db_attr_set_value(dba_db_attr ins, const char* value);
00107 
00120 dba_err dba_db_attr_insert(dba_db_attr ins, int replace);
00121 
00132 dba_err dba_db_attr_load(dba_db_attr ins, dba_var var);
00133 
00134 #ifdef  __cplusplus
00135 }
00136 #endif
00137 
00138 /* vim:set ts=4 sw=4: */
00139 #endif

Generated on Fri Jun 22 14:45:48 2007 for libdballe-db by  doxygen 1.5.2