File: hs-libpq.h

package info (click to toggle)
haskell-postgresql-libpq 0.11.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 212 kB
  • sloc: haskell: 1,385; ansic: 74; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef HS_POSTGRESQL_LIBPQ
#define HS_POSTGRESQL_LIBPQ

#include <string.h>
#include <stdlib.h>
#include <libpq-fe.h>
#include <libpq/libpq-fs.h>

typedef struct PGnotice{
  struct PGnotice * next;
  size_t len;
  char   str[];
} PGnotice;

typedef struct {
  PGnotice * first;
  PGnotice * last;
} NoticeBuffer;

void hs_postgresql_libpq_discard_notices(NoticeBuffer* arg, const PGresult* res);
void hs_postgresql_libpq_store_notices(NoticeBuffer* arg, const PGresult* res);
PGnotice * hs_postgresql_libpq_get_notice(NoticeBuffer* arg);
NoticeBuffer * hs_postgresql_libpq_malloc_noticebuffer (void);
void hs_postgresql_libpq_free_noticebuffer (NoticeBuffer * arg);

#endif