Namespace: OpenEdge.BusinessLogic.Query
Class
QueryBuilder
Parent classes:
Inherits: Progress.Lang.Object

/* *************************************************************************************************************************
Copyright (c) 2019 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:QueryBuilder
Author(s):pjudge & dugrau
Created:Thu May 10 12:38:00 EDT 2018
Notes:ADAS-101
/* Returns a table/buffer handle for a given name from an input schema




Method Summary
Options Name Purpose
CHARACTER BuildClause (handle, QueryPredicate) /* Builds a WHERE clause for a table from a QueryPredicate @param handle The table buffer handle @param QueryPredicate The abstract query predicate @return character A string representation of the where clause */
CHARACTER BuildGroup (handle, QueryGroup) /* Builds a query group string from a group @param handle The table/buffer for which the group is being built @param QueryGroup The group @return character A group string */
HANDLE BuildQuery (IGetDataRequest, handle) /* Builds a query handle (object) from a IGetDataRequest object. This method maps the input names to the input handle's SERIALIZE-NAMEs and uses the 'real' names to build the where clause @param IGetDataRequest A valid queryn definition @param handle a Dataset or buffer (TT or DB) handle @return handle A valid QUERY handle */
CHARACTER BuildQueryString (IGetDataRequest) /* Builds a query string from a IGetDataRequest object. This method does no name conversions - just takes the names from the input object. @param IGetDataRequest A valid queryn definition @return character A complete WHERE clause , with no name conversions */
CHARACTER BuildQueryString (IGetDataRequest, handle) /* Builds a query string from a IGetDataRequest object. This method maps the input names to the input handle's SERIALIZE-NAMEs and uses the 'real' names to build the where clause @param IGetDataRequest A valid queryn definition @param handle a Dataset or buffer (TT or DB) handle @return character A complete WHERE clause */
HANDLE GetFieldBuffer (handle, character) /* Returns a fiueld handle for a given name from an input buffer @param handle The input table/buffer @param character The field name. Can be the 'real' name or the serialize-name @return handle A buffer field handle for the given name. */
HANDLE GetTableBuffer (handle, character) /* Returns a table/buffer handle for a given name from an input schema @param handle The input schema (dataset, buffer, table) @param character The table name. Can be the 'real' name or the serialize-name @return handle A buffer handle for the given name. */
CHARACTER MapJoin (character, character, JoinEnum) /* Creates a templated join phrase for a clause @param character The current query string @param character The query where clause that's being joined @param JoinEnum The join to apply @return character A new query string, including the join phrase */
CHARACTER MapOperator (QueryOperatorEnum, character) /* Maps a query operator into a string template @param QueryOperatorEnum The operator @param character The the data type @return character A templated operator map of the form "&1 eq &2" */


Method Detail
Top

CHARACTER BuildClause (handle, QueryPredicate)

/* Builds a WHERE clause for a table from a QueryPredicate
Parameters:
phTable HANDLE
poClause OpenEdge.BusinessLogic.QueryPredicate
Returns CHARACTER
character A string representation of the where clause
Top

CHARACTER BuildGroup (handle, QueryGroup)

/* Builds a query group string from a group
Parameters:
phTable HANDLE
poGroup OpenEdge.BusinessLogic.QueryGroup
Returns CHARACTER
character A group string
Top

HANDLE BuildQuery (IGetDataRequest, handle)

/* Builds a query handle (object) from a IGetDataRequest object. This method maps
the input names to the input handle's SERIALIZE-NAMEs and uses the 'real'
names to build the where clause
Parameters:
pFilter Ccs.BusinessLogic.IGetDataRequest
pSchema HANDLE
Returns HANDLE
handle A valid QUERY handle
Top

CHARACTER BuildQueryString (IGetDataRequest)

/* Builds a query string from a IGetDataRequest object. This method does
no name conversions - just takes the names from the input object.
Parameters:
pFilter Ccs.BusinessLogic.IGetDataRequest
Returns CHARACTER
character A complete WHERE clause , with no name conversions
Top

CHARACTER BuildQueryString (IGetDataRequest, handle)

/* Builds a query string from a IGetDataRequest object. This method maps
the input names to the input handle's SERIALIZE-NAMEs and uses the 'real'
names to build the where clause
Parameters:
pFilter Ccs.BusinessLogic.IGetDataRequest
pSchema HANDLE
Returns CHARACTER
character A complete WHERE clause
Top

HANDLE GetFieldBuffer (handle, character)

/* Returns a fiueld handle for a given name from an input buffer
Parameters:
phTable HANDLE
pcFieldName CHARACTER
Returns HANDLE
handle A buffer field handle for the given name.
Top

HANDLE GetTableBuffer (handle, character)

/* Returns a table/buffer handle for a given name from an input schema
Parameters:
phSchema HANDLE
pcTableName CHARACTER
Returns HANDLE
handle A buffer handle for the given name.
Top

CHARACTER MapJoin (character, character, JoinEnum)

/* Creates a templated join phrase for a clause
Parameters:
pcQuery CHARACTER
pcClause CHARACTER
poJoinAs Ccs.BusinessLogic.JoinEnum
Returns CHARACTER
character A new query string, including the join phrase
Top

CHARACTER MapOperator (QueryOperatorEnum, character)

/* Maps a query operator into a string template
Parameters:
poOperator Ccs.BusinessLogic.QueryOperatorEnum
pcDataType CHARACTER
Returns CHARACTER
character A templated operator map of the form "&1 eq &2"


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15