~ubuntu-branches/ubuntu/karmic/firebird2.1/karmic

« back to all changes in this revision

Viewing changes to src/dsql/sqlda.h

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2008-05-26 23:59:25 UTC
  • Revision ID: james.westby@ubuntu.com-20080526235925-2pnqj6nxpppoeaer
Tags: upstream-2.1.0.17798-0.ds2
ImportĀ upstreamĀ versionĀ 2.1.0.17798-0.ds2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *      PROGRAM:        C preprocessor
 
3
 *      MODULE:         sqlda.h
 
4
 *      DESCRIPTION:    DSQL definitions for non-DSQL modules
 
5
 *
 
6
 * The contents of this file are subject to the Interbase Public
 
7
 * License Version 1.0 (the "License"); you may not use this file
 
8
 * except in compliance with the License. You may obtain a copy
 
9
 * of the License at http://www.Inprise.com/IPL.html
 
10
 *
 
11
 * Software distributed under the License is distributed on an
 
12
 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
 
13
 * or implied. See the License for the specific language governing
 
14
 * rights and limitations under the License.
 
15
 *
 
16
 * The Original Code was created by Inprise Corporation
 
17
 * and its predecessors. Portions created by Inprise Corporation are
 
18
 * Copyright (C) Inprise Corporation.
 
19
 *
 
20
 * All Rights Reserved.
 
21
 * Contributor(s): ______________________________________.
 
22
 */
 
23
 
 
24
#ifndef DSQL_SQLDA_H
 
25
#define DSQL_SQLDA_H
 
26
 
 
27
// SQLDA dialects 
 
28
 
 
29
const USHORT DIALECT_sqlda      = 0;
 
30
const USHORT DIALECT_xsqlda     = 1;
 
31
 
 
32
struct SQLVAR
 
33
{
 
34
        SSHORT  sqltype;
 
35
        SSHORT  sqllen;
 
36
        SCHAR*  sqldata;
 
37
        SSHORT* sqlind;
 
38
        SSHORT  sqlname_length;
 
39
        SCHAR   sqlname[30];
 
40
};
 
41
 
 
42
struct SQLDA
 
43
{
 
44
        SCHAR   sqldaid[8];
 
45
        SLONG   sqldabc;
 
46
        SSHORT  sqln;
 
47
        SSHORT  sqld;
 
48
        SQLVAR  sqlvar[1];
 
49
};
 
50
 
 
51
#define SQLDA_LENGTH(n)         (sizeof (SQLDA) + (n - 1) * sizeof (SQLVAR))
 
52
 
 
53
// Structure to support conversion of SQLDA's to messages 
 
54
 
 
55
struct sqlda_sup
 
56
{
 
57
        struct dasup_clause
 
58
        {
 
59
                SCHAR*  dasup_blr;
 
60
                SCHAR*  dasup_msg;
 
61
                USHORT  dasup_blr_length;
 
62
                USHORT  dasup_blr_buf_len;
 
63
                USHORT  dasup_msg_buf_len;
 
64
 
 
65
                SCHAR*  dasup_info_buf;
 
66
                USHORT  dasup_info_len;
 
67
        } dasup_clauses[2];
 
68
 
 
69
        USHORT  dasup_dialect;          // Dialect associated with statement 
 
70
        USHORT  dasup_stmt_type;        // Type of statement 
 
71
 
 
72
};
 
73
 
 
74
// enum would be troblesome here
 
75
const USHORT DASUP_CLAUSE_select        = 0;
 
76
const USHORT DASUP_CLAUSE_bind          = 1;
 
77
 
 
78
#include "../dsql/sqlda_pub.h"
 
79
 
 
80
#endif // DSQL_SQLDA_H
 
81