~ubuntu-branches/ubuntu/raring/psqlodbc/raring

« back to all changes in this revision

Viewing changes to bind.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-05-13 10:47:36 UTC
  • Revision ID: james.westby@ubuntu.com-20040513104736-a530gmn0p3knep89
Tags: upstream-07.03.0200
ImportĀ upstreamĀ versionĀ 07.03.0200

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* File:                        bind.h
 
2
 *
 
3
 * Description:         See "bind.c"
 
4
 *
 
5
 * Comments:            See "notice.txt" for copyright and license information.
 
6
 *
 
7
 */
 
8
 
 
9
#ifndef __BIND_H__
 
10
#define __BIND_H__
 
11
 
 
12
#include "psqlodbc.h"
 
13
 
 
14
/*
 
15
 * BindInfoClass -- stores information about a bound column
 
16
 */
 
17
struct BindInfoClass_
 
18
{
 
19
        Int4            buflen;                 /* size of buffer */
 
20
        Int4            data_left;              /* amount of data left to read
 
21
                                                                 * (SQLGetData) */
 
22
        char       *buffer;                     /* pointer to the buffer */
 
23
        Int4       *used;                       /* used space in the buffer (for strings
 
24
                                                                 * not counting the '\0') */
 
25
        char       *ttlbuf;                     /* to save the large result */
 
26
        Int4            ttlbuflen;              /* the buffer length */
 
27
        Int4            ttlbufused;             /* used length of the buffer */
 
28
        Int2            returntype;             /* kind of conversion to be applied when
 
29
                                                                 * returning (SQL_C_DEFAULT,
 
30
                                                                 * SQL_C_CHAR...) */
 
31
        Int2    precision;              /* the precision for numeric or timestamp type */
 
32
        Int2    scale;                  /* the scale for numeric type */
 
33
};
 
34
 
 
35
/*
 
36
 * ParameterInfoClass -- stores information about a bound parameter
 
37
 */
 
38
struct ParameterInfoClass_
 
39
{
 
40
        Int4            buflen;
 
41
        char       *buffer;
 
42
        Int4       *used;
 
43
        Int2            paramType;
 
44
        Int2            CType;
 
45
        Oid                     lobj_oid;
 
46
        Int4       *EXEC_used;          /* amount of data */
 
47
        char       *EXEC_buffer;        /* the data */
 
48
        Int2            precision;      /* the precision for numeric or timestamp type */
 
49
        Int2            scale;          /* the scale for numeric type */
 
50
        char            data_at_exec;
 
51
};
 
52
 
 
53
/*
 
54
 * ParameterImplClass -- stores implemntation information about a parameter
 
55
 */
 
56
struct ParameterImplClass_
 
57
{
 
58
        Int2            paramType;
 
59
        Int2            SQLType;
 
60
        Int4            PGType;
 
61
        UInt4           column_size;
 
62
        Int2            decimal_digits;
 
63
        Int2            precision;      /* the precision for numeric or timestamp type */
 
64
        Int2            scale;          /* the scale for numeric type */
 
65
};
 
66
 
 
67
BindInfoClass *create_empty_bindings(int num_columns);
 
68
void    extend_column_bindings(ARDFields *opts, int num_columns);
 
69
void    reset_a_column_binding(ARDFields *opts, int icol);
 
70
void    extend_parameter_bindings(APDFields *opts, int num_columns);
 
71
void    extend_iparameter_bindings(IPDFields *opts, int num_columns);
 
72
void    reset_a_parameter_binding(APDFields *opts, int ipar);
 
73
void    reset_a_iparameter_binding(IPDFields *opts, int ipar);
 
74
 
 
75
#endif