8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-30 20:03:03 +01:00
firebird-mirror/src/jrd/evl_proto.h

70 lines
1.9 KiB
C
Raw Normal View History

2001-05-23 15:26:42 +02:00
/*
* PROGRAM: JRD Access Method
* MODULE: evl_proto.h
* DESCRIPTION: Prototype header file for evl.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): ______________________________________.
*/
#ifndef JRD_EVL_PROTO_H
#define JRD_EVL_PROTO_H
2001-05-23 15:26:42 +02:00
2002-06-04 21:56:16 +02:00
#include "../jrd/intl_classes.h"
2010-12-05 01:54:54 +01:00
#include "../jrd/req.h"
2001-05-23 15:26:42 +02:00
namespace Jrd
{
class InversionNode;
struct Item;
class ItemInfo;
}
dsc* EVL_assign_to(Jrd::thread_db* tdbb, const Jrd::ValueExprNode*);
Jrd::RecordBitmap** EVL_bitmap(Jrd::thread_db* tdbb, const Jrd::InversionNode*, Jrd::RecordBitmap*);
bool EVL_field(Jrd::jrd_rel*, Jrd::Record*, USHORT, dsc*);
void EVL_make_value(Jrd::thread_db* tdbb, const dsc*, Jrd::impure_value*, MemoryPool* pool = NULL);
void EVL_validate(Jrd::thread_db*, const Jrd::Item&, const Jrd::ItemInfo*, dsc*, bool);
2010-12-05 01:54:54 +01:00
namespace Jrd
{
// Evaluate a value expression.
inline dsc* EVL_expr(thread_db* tdbb, jrd_req* request, const ValueExprNode* node)
{
if (!node)
BUGCHECK(303); // msg 303 Invalid expression for evaluation
SET_TDBB(tdbb);
if (--tdbb->tdbb_quantum < 0)
JRD_reschedule(tdbb, 0, true);
request->req_flags &= ~req_null;
dsc* desc = node->execute(tdbb, request);
if (desc)
request->req_flags &= ~req_null;
else
request->req_flags |= req_null;
return desc;
}
}
#endif // JRD_EVL_PROTO_H