8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 21:23:04 +01:00
firebird-mirror/src/dsql/sym.h

72 lines
1.8 KiB
C
Raw Normal View History

2001-05-23 15:26:42 +02:00
/*
* PROGRAM: Dynamic SQL runtime support
* MODULE: sym.h
* DESCRIPTION: Definitions for symbol table
*
* 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): ______________________________________.
*/
2003-09-26 13:02:12 +02:00
#ifndef DSQL_SYM_H
#define DSQL_SYM_H
2001-05-23 15:26:42 +02:00
#include "../jrd/common.h"
2008-02-28 14:48:16 +01:00
namespace Jrd {
2008-12-05 01:56:15 +01:00
// possible symbol types
2001-05-23 15:26:42 +02:00
2004-05-24 19:22:35 +02:00
enum sym_type {
2003-03-16 11:54:29 +01:00
SYM_statement,
SYM_cursor,
SYM_keyword,
SYM_context,
SYM_relation,
SYM_field,
SYM_stream,
SYM_udf,
SYM_procedure,
SYM_intlsym_charset,
SYM_intlsym_collation,
2003-03-16 11:54:29 +01:00
SYM_eof
2004-05-24 19:22:35 +02:00
};
typedef sym_type SYM_TYPE;
2001-05-23 15:26:42 +02:00
2008-12-05 01:56:15 +01:00
// symbol block
2001-05-23 15:26:42 +02:00
2009-01-08 10:27:07 +01:00
class dsql_sym : public pool_alloc_rpt<UCHAR, dsql_type_sym>
{
2001-12-24 03:51:06 +01:00
public:
2008-12-05 01:56:15 +01:00
void *sym_dbb; // generic DB structure handle
const TEXT *sym_string; // address of asciz string
USHORT sym_length; // length of string (exc. term.)
SYM_TYPE sym_type; // symbol type
USHORT sym_keyword; // keyword number, if keyword
USHORT sym_version; // dialect version the symbol was introduced
void *sym_object; // general pointer to object
dsql_sym* sym_collision; // collision pointer
dsql_sym* sym_homonym; // homonym pointer
TEXT sym_name[2]; // space for name, if necessary
2001-12-24 03:51:06 +01:00
};
2009-01-08 10:27:07 +01:00
2001-05-23 15:26:42 +02:00
2008-02-29 09:45:02 +01:00
} // namespace
2008-02-28 14:48:16 +01:00
2003-09-26 13:02:12 +02:00
#endif // DSQL_SYM_H