first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef __PGSQL_H__
|
||||
#define __PGSQL_H__
|
||||
|
||||
#include <libpq-fe.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int pgsql_db_connect(const char*host,const char*name,const char*user,const char*pass,long port);
|
||||
int pgsql_exec(const char * format, ... );
|
||||
const PGresult* pgsql_query(const char * format, ... );
|
||||
int pgsql_num_rows(const PGresult *res);
|
||||
int pgsql_num_fields(const PGresult *res);
|
||||
map<const char*,const char*> pgsql_fetch_assoc(const PGresult *res, int row);
|
||||
vector<const char*> pgsql_fetch_row(const PGresult *res, int row);
|
||||
void pgsql_close();
|
||||
char* pgsql_uitoa(unsigned n, char *s, int radix);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
vi:ts=2
|
||||
*/
|
||||
Reference in New Issue
Block a user