File: convert.h

package info (click to toggle)
psqlodbc 1%3A09.05.0400-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,552 kB
  • ctags: 3,747
  • sloc: ansic: 46,891; sh: 11,451; cpp: 1,746; makefile: 169; sql: 143; xml: 31
file content (45 lines) | stat: -rw-r--r-- 1,205 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* File:			convert.h
 *
 * Description:		See "convert.c"
 *
 * Comments:		See "readme.txt" for copyright and license information.
 *
 */

#ifndef __CONVERT_H__
#define __CONVERT_H__

#include "psqlodbc.h"

#ifdef	__cplusplus
extern "C" {
#endif
/* copy_and_convert results */
#define COPY_OK							0
#define COPY_UNSUPPORTED_TYPE					1
#define COPY_UNSUPPORTED_CONVERSION				2
#define COPY_RESULT_TRUNCATED					3
#define COPY_GENERAL_ERROR						4
#define COPY_NO_DATA_FOUND						5

int	copy_and_convert_field_bindinfo(StatementClass *stmt, OID field_type, int atttypmod, void *value, int col);
int	copy_and_convert_field(StatementClass *stmt,
			OID field_type, int atttypmod,
			void *value,
			SQLSMALLINT fCType, int precision,
			PTR rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue, SQLLEN *pIndicator);

int		copy_statement_with_parameters(StatementClass *stmt, BOOL);
SQLLEN		pg_hex2bin(const char *in, char *out, SQLLEN len);
size_t		findTag(const char *str, int ccsc);

BOOL build_libpq_bind_params(StatementClass *stmt,
						int *nParams, OID **paramTypes,
						char ***paramValues,
						int **paramLengths,
						int **paramFormats,
						int *resultFormat);
#ifdef	__cplusplus
}
#endif
#endif