File: lobj.h

package info (click to toggle)
unixodbc 2.2.11-16
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 17,332 kB
  • ctags: 12,399
  • sloc: ansic: 116,624; cpp: 29,333; sh: 25,024; makefile: 3,002; lex: 241; yacc: 182; perl: 142; sed: 16; sql: 1
file content (48 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download | duplicates (14)
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
46
47
48

/* File:            lobj.h
 *
 * Description:     See "lobj.c"
 *
 * Comments:        See "notice.txt" for copyright and license information.
 *
 */

#ifndef __LOBJ_H__
#define __LOBJ_H__


#include "psqlodbc.h"

struct lo_arg {
	int		isint;
	int		len;
	union
	{
		int		integer;
		char	*ptr;
	} u;
};

#define LO_CREAT		957
#define LO_OPEN			952
#define LO_CLOSE		953
#define LO_READ			954
#define LO_WRITE		955
#define LO_LSEEK		956
#define LO_TELL			958
#define LO_UNLINK		964

#define INV_WRITE		0x00020000
#define INV_READ		0x00040000

Oid odbc_lo_creat(ConnectionClass *conn, int mode);
int odbc_lo_open(ConnectionClass *conn, int lobjId, int mode);
int odbc_lo_close(ConnectionClass *conn, int fd);
int odbc_lo_read(ConnectionClass *conn, int fd, char *buf, int len);
int odbc_lo_write(ConnectionClass *conn, int fd, char *buf, int len);
int odbc_lo_lseek(ConnectionClass *conn, int fd, int offset, int len);
int odbc_lo_tell(ConnectionClass *conn, int fd);
int odbc_lo_unlink(ConnectionClass *conn, Oid lobjId);

#endif