2001-05-23 15:26:42 +02:00
|
|
|
/*
|
|
|
|
* PROGRAM: JRD Access Method
|
|
|
|
* MODULE: evl_proto.h
|
2003-12-11 11:33:30 +01:00
|
|
|
* 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): ______________________________________.
|
|
|
|
*/
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#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
|
|
|
|
2010-01-20 01:02:58 +01:00
|
|
|
namespace Jrd
|
|
|
|
{
|
2010-10-12 13:36:51 +02:00
|
|
|
class InversionNode;
|
2010-01-20 01:02:58 +01:00
|
|
|
struct Item;
|
2015-06-05 20:26:36 +02:00
|
|
|
class ItemInfo;
|
2010-01-20 01:02:58 +01:00
|
|
|
}
|
|
|
|
|
2010-11-21 04:47:29 +01:00
|
|
|
dsc* EVL_assign_to(Jrd::thread_db* tdbb, const Jrd::ValueExprNode*);
|
2010-10-12 13:36:51 +02:00
|
|
|
Jrd::RecordBitmap** EVL_bitmap(Jrd::thread_db* tdbb, const Jrd::InversionNode*, Jrd::RecordBitmap*);
|
2004-03-20 15:57:40 +01:00
|
|
|
bool EVL_field(Jrd::jrd_rel*, Jrd::Record*, USHORT, dsc*);
|
2011-02-11 01:43:15 +01:00
|
|
|
void EVL_make_value(Jrd::thread_db* tdbb, const dsc*, Jrd::impure_value*, MemoryPool* pool = NULL);
|
2007-01-17 02:19:01 +01:00
|
|
|
void EVL_validate(Jrd::thread_db*, const Jrd::Item&, const Jrd::ItemInfo*, dsc*, bool);
|
2003-12-27 05:37:23 +01:00
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#endif // JRD_EVL_PROTO_H
|