diff options
Diffstat (limited to 'src/pq/pq.h')
-rw-r--r-- | src/pq/pq.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/pq/pq.h b/src/pq/pq.h index 404cc4f3b..0c011a6ef 100644 --- a/src/pq/pq.h +++ b/src/pq/pq.h | |||
@@ -107,6 +107,39 @@ struct GNUNET_PQ_Context | |||
107 | 107 | ||
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Internal types that are supported as array types. | ||
111 | */ | ||
112 | |||
113 | enum array_types | ||
114 | { | ||
115 | array_of_bool, | ||
116 | array_of_uint16, | ||
117 | array_of_uint32, | ||
118 | array_of_uint64, | ||
119 | array_of_byte, /* buffers of (char *), (void *), ... */ | ||
120 | array_of_string, /* NULL-terminated (char *) */ | ||
121 | array_of_abs_time, | ||
122 | array_of_rel_time, | ||
123 | array_of_timestamp, | ||
124 | array_of_MAX, /* must be last */ | ||
125 | }; | ||
126 | |||
127 | /** | ||
128 | * the header for a postgresql array in binary format. note that this a | ||
129 | * simplified special case of the general structure (which contains pointers), | ||
130 | * as we only support one-dimensional arrays. | ||
131 | */ | ||
132 | struct pq_array_header | ||
133 | { | ||
134 | uint32_t ndim; /* number of dimensions. we only support ndim = 1 */ | ||
135 | uint32_t has_null; | ||
136 | uint32_t oid; | ||
137 | uint32_t dim; /* size of the array */ | ||
138 | uint32_t lbound; /* index value of first element in the db (default: 1). */ | ||
139 | } __attribute__((packed)); | ||
140 | |||
141 | |||
142 | /** | ||
110 | * Internal API. Reconnect should re-register notifications | 143 | * Internal API. Reconnect should re-register notifications |
111 | * after a disconnect. | 144 | * after a disconnect. |
112 | * | 145 | * |