2001-05-23 15:26:42 +02:00
|
|
|
/*
|
|
|
|
* PROGRAM: Dynamic SQL runtime support
|
|
|
|
* MODULE: make_proto.h
|
2003-09-29 14:43:14 +02:00
|
|
|
* DESCRIPTION: Prototype Header file for make.cpp
|
2001-05-23 15:26:42 +02:00
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Interbase Public
|
|
|
|
* License Version 1.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy
|
|
|
|
* of the License at http://www.Inprise.com/IPL.html
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an
|
|
|
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
|
|
|
* or implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code was created by Inprise Corporation
|
|
|
|
* and its predecessors. Portions created by Inprise Corporation are
|
|
|
|
* Copyright (C) Inprise Corporation.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
* Contributor(s): ______________________________________.
|
2002-08-03 17:27:20 +02:00
|
|
|
*
|
|
|
|
* 2002-07-20 Arno Brinkman: Added MAKE_desc_from_list
|
2001-05-23 15:26:42 +02:00
|
|
|
*/
|
|
|
|
|
2003-09-26 12:50:59 +02:00
|
|
|
#ifndef DSQL_MAKE_PROTO_H
|
|
|
|
#define DSQL_MAKE_PROTO_H
|
2001-05-23 15:26:42 +02:00
|
|
|
|
|
|
|
#include "../dsql/sym.h"
|
2008-02-28 19:42:30 +01:00
|
|
|
#include "../dsql/node.h"
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2008-02-28 14:48:16 +01:00
|
|
|
namespace Jrd {
|
|
|
|
class dsql_nod;
|
|
|
|
class dsql_fld;
|
|
|
|
class dsql_req;
|
2009-12-20 22:01:10 +01:00
|
|
|
class DsqlCompilerScratch;
|
2008-02-28 19:42:30 +01:00
|
|
|
|
|
|
|
// Parameters to MAKE_constant
|
|
|
|
enum dsql_constant_type {
|
|
|
|
CONSTANT_STRING = 0, // stored as a string
|
|
|
|
// CONSTANT_SLONG = 1, // stored as a SLONG
|
|
|
|
CONSTANT_DOUBLE = 2, // stored as a string
|
|
|
|
CONSTANT_DATE = 3, // stored as a SLONG
|
|
|
|
CONSTANT_TIME = 4, // stored as a ULONG
|
|
|
|
CONSTANT_TIMESTAMP = 5, // stored as a QUAD
|
2008-03-01 16:08:11 +01:00
|
|
|
CONSTANT_SINT64 = 6 // stored as a SINT64
|
2008-02-28 19:42:30 +01:00
|
|
|
};
|
2008-12-05 01:56:15 +01:00
|
|
|
|
2008-04-16 12:38:08 +02:00
|
|
|
// Parameters to MAKE_variable
|
|
|
|
enum dsql_var_type
|
|
|
|
{
|
|
|
|
VAR_input,
|
|
|
|
VAR_output,
|
|
|
|
VAR_local
|
|
|
|
};
|
2008-04-18 03:37:44 +02:00
|
|
|
}
|
2008-02-28 14:48:16 +01:00
|
|
|
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2009-04-10 22:18:17 +02:00
|
|
|
Jrd::dsql_nod* MAKE_const_slong(SLONG);
|
2008-02-28 14:48:16 +01:00
|
|
|
Jrd::dsql_nod* MAKE_constant(Jrd::dsql_str*, Jrd::dsql_constant_type);
|
|
|
|
Jrd::dsql_nod* MAKE_str_constant(Jrd::dsql_str*, SSHORT);
|
|
|
|
Jrd::dsql_str* MAKE_cstring(const char*);
|
2009-12-20 22:01:10 +01:00
|
|
|
void MAKE_desc(Jrd::DsqlCompilerScratch*, dsc*, Jrd::dsql_nod*, Jrd::dsql_nod*);
|
2008-02-28 14:48:16 +01:00
|
|
|
void MAKE_desc_from_field(dsc*, const Jrd::dsql_fld*);
|
2009-12-20 22:01:10 +01:00
|
|
|
void MAKE_desc_from_list(Jrd::DsqlCompilerScratch*, dsc*, Jrd::dsql_nod*, Jrd::dsql_nod*, const TEXT*);
|
2008-02-28 14:48:16 +01:00
|
|
|
Jrd::dsql_nod* MAKE_field(Jrd::dsql_ctx*, Jrd::dsql_fld*, Jrd::dsql_nod*);
|
|
|
|
Jrd::dsql_nod* MAKE_field_name(const char*);
|
|
|
|
Jrd::dsql_nod* MAKE_list(Jrd::DsqlNodStack&);
|
|
|
|
Jrd::dsql_nod* MAKE_node(Dsql::nod_t, int);
|
2009-01-07 10:30:57 +01:00
|
|
|
Jrd::dsql_par* MAKE_parameter(Jrd::dsql_msg*, bool, bool, USHORT, const Jrd::dsql_nod*);
|
2010-02-13 21:29:29 +01:00
|
|
|
void MAKE_parameter_names(Jrd::dsql_par*, const Jrd::dsql_nod*);
|
2009-01-07 10:30:57 +01:00
|
|
|
Jrd::dsql_str* MAKE_string(const char*, int);
|
|
|
|
Jrd::dsql_sym* MAKE_symbol(Jrd::dsql_dbb*, const TEXT*, USHORT, Jrd::sym_type, Jrd::dsql_req*);
|
2008-02-28 14:48:16 +01:00
|
|
|
Jrd::dsql_str* MAKE_tagged_string(const char* str, size_t length, const char* charset);
|
2009-01-07 10:30:57 +01:00
|
|
|
Jrd::dsql_nod* MAKE_variable(Jrd::dsql_fld*, const TEXT*, const Jrd::dsql_var_type type, USHORT,
|
2008-04-16 12:38:08 +02:00
|
|
|
USHORT, USHORT);
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2003-09-26 12:50:59 +02:00
|
|
|
#endif // DSQL_MAKE_PROTO_H
|