data.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_DATA_H
00023 #define DBALLE_DB_DATA_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_data
00044 {
00046     struct _dba_db* db;
00048     SQLHSTMT istm;
00050     SQLHSTMT ustm;
00051 
00053     DBALLE_SQL_C_SINT_TYPE id_context;
00055     dba_varcode id_var;
00057     char value[255];
00059     SQLLEN value_ind;
00060 };
00062 typedef struct _dba_db_data* dba_db_data;
00063 
00074 dba_err dba_db_data_create(dba_db db, dba_db_data* ins);
00075 
00082 void dba_db_data_delete(dba_db_data ins);
00083 
00092 void dba_db_data_set(dba_db_data ins, dba_var var);
00093 
00102 void dba_db_data_set_value(dba_db_data ins, const char* value);
00103 
00116 dba_err dba_db_data_insert(dba_db_data ins, int rewrite);
00117 
00118 
00119 #ifdef  __cplusplus
00120 }
00121 #endif
00122 
00123 /* vim:set ts=4 sw=4: */
00124 #endif

Generated on Thu Aug 30 14:59:08 2007 for libdballe-db by  doxygen 1.5.3