Namespace: Consultingwerk.OERA.Query
Class 
DSQueryString Copy to Clipboard
Parent classes:
Inherits: Consultingwerk.OERA.Query.QueryString
Implements: Consultingwerk.OERA.IDSQueryString, Consultingwerk.OERA.Query.IQueryMap, Consultingwerk.OERA.Query.IThrowsErrorsOnInvalidSourceMapping
Inherited by: Consultingwerk.OERA.Query.DSQueryStringForKeyValueTable

File:DSQueryString
Purpose:Extends QueryString to provide query transformation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Wed Mar 03 08:24:02 CET 2010



Top Method Summary
Options Name Purpose
+ AddQueryWhere (character, character, character) Inserts a new expression to query's prepare string for a specified buffer.
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER BuildQueryString (handle) Builds the QueryString for the Query
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER CheckIndex (handle) Returns the Index information of the query used for a buffer
Inherited from Consultingwerk.OERA.Query.QueryString
# ClearQuery () Clears the internal state to allow parsing another query string
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER ColumnSource (character) Returns the name of the column from the source (database) column
+ CHARACTER DefaultQuery () Returns the default query string for the data source
# CHARACTER EscapeKnownFunction (character) Escapes the brackets around known ABL functions in the query string
Inherited from Consultingwerk.OERA.Query.QueryString
+ LOGICAL InsertToQuery (handle) Insert the QueryString into the query
Inherited from Consultingwerk.OERA.Query.QueryString
# ParseQuery (character) Parses the logical buffer's target query and stores it for transformation to the datasource query.
Inherited from Consultingwerk.OERA.Query.QueryString
# ParseSortExpression (character) Parses the Sort Expression
Inherited from Consultingwerk.OERA.Query.QueryString

Top Constructor Summary
Options Name Purpose
+ DSQueryString (character, DataAccess, character, logical) Constructor for the DSQueryString class
+ DSQueryString (character, IDSQueryStringSource, character) Constructor for the DSQueryString class

Top Property Summary
Options Name Purpose
+ LOGICAL FilterUsingInnerJoin Instructs the Query-Builder in method BuildQueryString to remove an eventually present OUTER-JOIN keyword from the source default query when filtering on a ceratin table.
Inherited from Consultingwerk.OERA.Query.QueryString
# Consultingwerk.OERA.Query.IDSQueryStringSource Instance Returns the reference to the owning IDSQueryStringSource (typically a DataAccess class) for call backs
# CHARACTER Table Returns the name of the temp-tabel this DSQueryString instance is providing source query manipulation for
+ LOGICAL ThrowErrorsOnInvalidSourceMapping Get and sets if this class throws an error when the client query string contains columns that are not mapped to a data source column
Inherited from Consultingwerk.OERA.Query.QueryString


Method Detail
Top

PUBLIC AddQueryWhere (character, character, character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Inserts a new expression to query's prepare string for a
specified buffer.
Notes:

Parameters:
pcBuffer CHARACTER
The name of the Buffer
pcExpression CHARACTER
The new expression
pcAndOr CHARACTER
Specifies what operator is used to add the new expression to existing expression(s), AND (default) / OR
Top

PUBLIC CHARACTER BuildQueryString (handle)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Builds the QueryString for the Query
Notes:

Parameters:
phQuery HANDLE
The HANDLE of the QUERY widget
Returns CHARACTER
The Query String
Top

PUBLIC CHARACTER CheckIndex (handle)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Returns the Index information of the query used for a buffer
Notes: For debugging/logging purposes only

Parameters:
phBuffer HANDLE
The handle to the buffer to return index information for
Returns CHARACTER
The index information of the query used for the buffer handle
Top

PROTECTED ClearQuery ()

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Clears the internal state to allow parsing another query string
Notes:

Top

PUBLIC CHARACTER ColumnSource (character)

Purpose: Returns the name of the column from the source (database) column
Notes: Invokes the SourceColumn method in the DataAccess class

Parameters:
pcColumn CHARACTER
The name of the temp-table column
Returns CHARACTER
The name of the source (database) column
Top

PUBLIC CHARACTER DefaultQuery ()

Purpose: Returns the default query string for the data source
Notes: Invokes SourceDefaultQuery in the DataAccess class

Returns CHARACTER
The default query string
Top

PROTECTED CHARACTER EscapeKnownFunction (character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Escapes the brackets around known ABL functions in the query string
Notes: SCL-1201, workaround for parsing issues with RECID() or ROWID()
function used in the query string

Parameters:
pcQueryString CHARACTER
The Query String to escape
Returns CHARACTER
The query string with the escaped brackets
Top

PUBLIC LOGICAL InsertToQuery (handle)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Insert the QueryString into the query
Notes: Actually performs QUERY-PREPARE on the Query-Handle

Parameters:
phQuery HANDLE
The HANDLE of the QUERY widget
Returns LOGICAL
True if successful
Top

PROTECTED ParseQuery (character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Parses the logical buffer's target query and stores it for
transformation to the datasource query.
Notes: See main comments

Parameters:
pcQuery CHARACTER
The QueryString to parse
Top

PROTECTED ParseSortExpression (character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Parses the Sort Expression
Notes:

Parameters:
pcSort CHARACTER
The sort expression to parse


Constructor Detail
Top

PUBLIC DSQueryString (character, DataAccess, character, logical)

Purpose: Constructor for the DSQueryString class
Notes: Alternative Constructor that allows setting of the
FilterUsingInnerJoin property of the QueryString class

Parameters:
pcQueryString CHARACTER
The query string from the current read request
phInstance Consultingwerk.OERA.DataAccess
The reference to the owning DataAccess class (for call backs)
pcTable CHARACTER
The name of the temp-table this DSQueryString instance is providing source query manipulation for
plFilterUsingInnerJoin LOGICAL
The value for the FilterUsingInnerJoin property
Top

PUBLIC DSQueryString (character, IDSQueryStringSource, character)

Purpose: Constructor for the DSQueryString class
Notes:

Parameters:
pcQueryString CHARACTER
The query string from the current read request
phInstance Consultingwerk.OERA.Query.IDSQueryStringSource
The reference to the owning IDSQueryStringSource (typically a DataAccess class) for call backs
pcTable CHARACTER
The name of the temp-table this DSQueryString instance is providing source query manipulation for


Property Detail
Top

PUBLIC LOGICAL FilterUsingInnerJoin

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Instructs the Query-Builder in method BuildQueryString to remove
an eventually present OUTER-JOIN keyword from the source default
query when filtering on a ceratin table.
Notes: This allows to filter Customers by SalesRep fields in a Query:
FOR EACH Customer, FIRST SalesRep OF Customer OUTER-JOIN
See Bug 2609 for a detailled discussion on the new functionality

Returns LOGICAL
Top

PROTECTED Consultingwerk.OERA.Query.IDSQueryStringSource Instance

Purpose: Returns the reference to the owning IDSQueryStringSource (typically
a DataAccess class) for call backs
Notes:

Returns Consultingwerk.OERA.Query.IDSQueryStringSource
Top

PROTECTED CHARACTER Table

Purpose: Returns the name of the temp-tabel this DSQueryString instance is
providing source query manipulation for
Notes:

Returns CHARACTER
Top

PUBLIC LOGICAL ThrowErrorsOnInvalidSourceMapping

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Get and sets if this class throws an error when the client query
string contains columns that are not mapped to a data source column
Notes:

Returns LOGICAL


©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:30:20