Namespace: OpenEdge.DataAdmin.DataSource
Type: Class DataSource
Parent Classes:
Inherits: OpenEdge.DataAdmin.DataSource.DBQuery
Implements: OpenEdge.DataAdmin.DataSource.IDataSource


/* Copyright (c) 2011-2014 by progress Software Corporation.
/*
/* all rights reserved. no part of this program or document
/* may be reproduced in any form or by any means without
/* permission in writing from progress Software Corporation.
Purpose: DataSource manages the source query for a target and deals with various
query tranformation in support of this. It implements IQueryMap
to utilize QueryString for the transformation HD



Method Summary
  Options Name Purpose
  LOGICAL AddUniqueOrNone (character, QueryString) /* converts a parent find on external parent key to query expression on internal key true means value is added or not needed false means not found ? means ambiguous */
  AfterRow (dataset-handle)
  AfterSetUrl () /* override to set url dependent props/vars*/
  LOGICAL Attach (handle)
  LOGICAL CheckQuery (QueryString, character)
  CHARACTER ColumnExpression (character, character, character) /* (part of IQueryMap interface used by QueryString to map query */
  CHARACTER ColumnSortSource (character) /** convert sort expression column for QueryString (second parse - column already transformed by ColumnSource(pccolumn) (part of IQueryMap interface used by QueryString to map query) */
  CHARACTER ColumnSource (character) /* return source columns for query mapping (part of IQueryMap interface used by QueryString to map query */
  CHARACTER CompareBuffers (handle, handle, character, character) /** compares two buffers and returns a comma separated list of fields that are different This is mainly needed to check for changes in character fields, since A = a. Many international characters that really are different will also be seen as equal by the ABL . @param bufferHandle of first buffer @param bufferHandle of the other buffer @param Excludefielsd comma separated list of fields to ignore @param options One of RAW,CASE-SENSITIVE or CASE-INSENSITIVE */
  LOGICAL CompareClobValues (handle, character, handle, character) /** Purpose: compare two CLOB buffer-fields Notes: The core does not currently support compare of CLOBs */
  HANDLE CreateMapSource ()
  CreateQuery ()
  HANDLE CreateSaveSource (character)
  DetachDatasource (handle)
  LOGICAL Fill ()
  CHARACTER FindTableJoinValues (character, character) /* Called from FindUniqueOrNoneQuery and must be overridden with unique find for related tables if this functionality is needed. returns a query expression of the table if it was found and throw standard progress error from the find */
  CHARACTER FindUniqueOrNoneQuery (character, character) /* */
  CHARACTER GetNextPosition () /* are there more records ahead? */
  LOGICAL PositionToLastBatch () /* set start rowid to get one batch including last*/
  LOGICAL PositionToRow (integer)
  LOGICAL PositionToWhere (character, logical) /* set start rowid to where position */
  LOGICAL Prepare ()
  LOGICAL Prepare (handle)
  LOGICAL Prepare (handle, character, character) /* prepare the query with a client query expression @DEPRECATED - The DataAccess should now use Prepare (handle,ITableRequest) The IFetchMessage has a GetTableRequest that always returns a an object also for blank query - This is kept for backwards compatibility - There may be cases that uses the join parameter, which has no replacement in the new prepare. This should likely be handled by an override an dedicated constructor. if this complicates stuff and join really is needed add a prepare(buffer,ITableRequest,join) Parameters @param buffer - client temp-table buffer in dataset @param clientquery - query from client expressed on the temp-table buffer must in principle be passed if active parent relation or builtquery is empty, but an empty query is valid when requesting all data @param pcjoin - optional join to a parent */
  LOGICAL Prepare (handle, character, character, character) /* prepare the query Parameters @param buffer - client temp-table buffer in dataset @param builtquery - optional final built query Caller may build a query from key information instead of from querystring for performance (queryparsing is the single most expensive operation of the source) @param clientquery - query from client expressed on the temp-table buffer must in principle be passed if active parent relation or builtquery is empty, but an empty query is valid when requesting all data @param pcjoin - optional join to a parent */
  LOGICAL Prepare (handle, ITableRequest)
  Preparebuffer (handle) /* override to set callback - define binding etc.. */
  LOGICAL PrepareQueryString (QueryString) /* prepare with QueryString (subclass override this for query optimization) */
  LOGICAL Refresh (handle)
  LOGICAL Refreshbuffers (handle)
  LOGICAL Save (handle)
  LOGICAL Save (handle, handle, integer)
  LOGICAL Save (handle, integer)
  LOGICAL SaveChildBuffers (handle, character, integer)
  CHARACTER SourceFields (character, character)

Constructor Summary
  Options Name Purpose
  DataSource () /* Expects DefineSource to be overridden with assign of Tables and PhysicalTables */
  DataSource (character, character)
  DataSource (character, character, character)
  DataSource (character, character, handle, character)
  DataSource (handle, character, character, character)

Property Summary
  Options Name Purpose
  INTEGER BatchSize
  OpenEdge.DataAdmin.DataAccess.IDataAccess DataAccess
  OpenEdge.DataAdmin.DataSource.DatabaseInfo DatabaseInfo
  HANDLE DataBuffer
  HANDLE DataSourceHandle
  CHARACTER FieldMapping
  Progress.Lang.Error FillError
  CHARACTER FillMode
  LOGICAL Lazy
  INTEGER NumRecords
  HANDLE ParentRelation
  CHARACTER SaveChildNames
  HANDLE SaveSourceHandle
  CHARACTER Url
  OpenEdge.DataAdmin.Lang.WebUtil WebUtil


Method Detail
Top

LOGICAL AddUniqueOrNone (character, QueryString)

/* converts a parent find on external parent key to query expression on internal key
true means value is added or not needed
false means not found
? means ambiguous
Parameters:
pcTable CHARACTER
 
pQueryStr OpenEdge.DataAdmin.Lang.QueryString
 
Returns LOGICAL
 
Top

AfterRow (dataset-handle)

Parameters:
hds DATASET-HANDLE
 
Top

AfterSetUrl ()

/* override to set url dependent props/vars
Top

LOGICAL Attach (handle)

Parameters:
bufferHandle HANDLE
 
Returns LOGICAL
 
Top

LOGICAL CheckQuery (QueryString, character)

Parameters:
pQueryStr OpenEdge.DataAdmin.Lang.QueryString
 
pcTable CHARACTER
 
Returns LOGICAL
 
Top

CHARACTER ColumnExpression (character, character, character)

/* (part of IQueryMap interface used by QueryString to map query
Parameters:
pcColumn CHARACTER
 
pcOperator CHARACTER
 
pcValue CHARACTER
 
Returns CHARACTER
 
Top

CHARACTER ColumnSortSource (character)

Purpose: convert sort expression column for QueryString
(second parse - column already transformed by ColumnSource(pccolumn)
(part of IQueryMap interface used by QueryString to map query)
Parameters:
pcColumn CHARACTER
 
Returns CHARACTER
 
Top

CHARACTER ColumnSource (character)

/* return source columns for query mapping
(part of IQueryMap interface used by QueryString to map query
Parameters:
pcColumn CHARACTER
 
Returns CHARACTER
 
Top

CHARACTER CompareBuffers (handle, handle, character, character)

Purpose: compares two buffers and returns a comma separated list of fields that are different
This is mainly needed to check for changes in character fields, since A = a.
Many international characters that really are different will also be seen as equal by the
ABL .
Parameters:
phbuffer1 HANDLE
 
phBuffer2 HANDLE
 
pcExclude CHARACTER
 
pcOption CHARACTER
 
Returns CHARACTER
 
Top

LOGICAL CompareClobValues (handle, character, handle, character)

Purpose: Purpose: compare two CLOB buffer-fields
Notes: The core does not currently support compare of CLOBs
Parameters:
phColumn1 HANDLE
 
pcOperator CHARACTER
 
phcolumn2 HANDLE
 
pcStrength CHARACTER
 
Returns LOGICAL
 
Top

HANDLE CreateMapSource ()

Returns HANDLE
 
Top

CreateQuery ()

Top

HANDLE CreateSaveSource (character)

Parameters:
cKey CHARACTER
 
Returns HANDLE
 
Top

DetachDatasource (handle)

Parameters:
phBuffer HANDLE
 
Top

LOGICAL Fill ()

Returns LOGICAL
 
Top

CHARACTER FindTableJoinValues (character, character)

/*
Called from FindUniqueOrNoneQuery and must be overridden with unique find
for related tables if this functionality is needed.
returns a query expression of the table if it was found and
throw standard progress error from the find
Parameters:
pTable CHARACTER
 
pFind CHARACTER
 
Returns CHARACTER
 
Top

CHARACTER FindUniqueOrNoneQuery (character, character)

/*
Parameters:
pcTable CHARACTER
 
pcQuery CHARACTER
 
Returns CHARACTER
 
Top

CHARACTER GetNextPosition ()

/* are there more records ahead?
Returns CHARACTER
 
Top

LOGICAL PositionToLastBatch ()

/* set start rowid to get one batch including last
Returns LOGICAL
 
Top

LOGICAL PositionToRow (integer)

Parameters:
piRow INTEGER
 
Returns LOGICAL
 
Top

LOGICAL PositionToWhere (character, logical)

/* set start rowid to where position
Parameters:
pcWhere CHARACTER
 
plFill LOGICAL
 
Returns LOGICAL
 
Top

LOGICAL Prepare ()

Returns LOGICAL
 
Top

LOGICAL Prepare (handle)

Parameters:
phBuffer HANDLE
 
Returns LOGICAL
 
Top

LOGICAL Prepare (handle, character, character)

/* prepare the query with a client query expression
@DEPRECATED - The DataAccess should now use Prepare (handle,ITableRequest)
The IFetchMessage has a GetTableRequest that always returns a
an object also for blank query
- This is kept for backwards compatibility
- There may be cases that uses the join parameter, which
has no replacement in the new prepare.
This should likely be handled by an override an dedicated
constructor. if this complicates stuff and join really is
needed add a prepare(buffer,ITableRequest,join)
Parameters
must in principle be passed if active parent relation or builtquery is empty,
but an empty query is valid when requesting all data
Parameters:
phBuffer HANDLE
 
pcClientQuery CHARACTER
 
pcJoin CHARACTER
  - optional join to a parent
Returns LOGICAL
 
Top

LOGICAL Prepare (handle, character, character, character)

/* prepare the query
Parameters
Caller may build a query from key information instead of from querystring
for performance (queryparsing is the single most expensive operation of the source)
must in principle be passed if active parent relation or builtquery is empty,
but an empty query is valid when requesting all data
Parameters:
phBuffer HANDLE
 
pcBuiltQuery CHARACTER
 
pcClientQuery CHARACTER
 
pcJoin CHARACTER
  - optional join to a parent
Returns LOGICAL
 
Top

LOGICAL Prepare (handle, ITableRequest)

Parameters:
phBuffer HANDLE
 
req OpenEdge.DataAdmin.Message.ITableRequest
 
Returns LOGICAL
 
Top

Preparebuffer (handle)

/* override to set callback - define binding etc..
Parameters:
phBuffer HANDLE
 
Top

LOGICAL PrepareQueryString (QueryString)

/* prepare with QueryString (subclass override this for query optimization)
Parameters:
poQueryString OpenEdge.DataAdmin.Lang.QueryString
 
Returns LOGICAL
 
Top

LOGICAL Refresh (handle)

Parameters:
bufferHandle HANDLE
 
Returns LOGICAL
 
Top

LOGICAL Refreshbuffers (handle)

Parameters:
bufferHandle HANDLE
 
Returns LOGICAL
 
Top

LOGICAL Save (handle)

Parameters:
bufferHandle HANDLE
 
Returns LOGICAL
 
Top

LOGICAL Save (handle, handle, integer)

Parameters:
parentbufferHandle HANDLE
 
bufferHandle HANDLE
 
piState INTEGER
 
Returns LOGICAL
 
Top

LOGICAL Save (handle, integer)

Parameters:
bufferHandle HANDLE
 
piState INTEGER
 
Returns LOGICAL
 
Top

LOGICAL SaveChildBuffers (handle, character, integer)

Parameters:
phBuffer HANDLE
 
pcChildnames CHARACTER
 
piState INTEGER
 
Returns LOGICAL
 
Top

CHARACTER SourceFields (character, character)

Parameters:
tablename CHARACTER
 
clientFields CHARACTER
 
Returns CHARACTER
 


Constructor Detail
Top

DataSource ()

/* Expects DefineSource to be overridden with assign of Tables and PhysicalTables
Top

DataSource (character, character)

Parameters:
pcTables CHARACTER
 
pcMapping CHARACTER
 
Top

DataSource (character, character, character)

Parameters:
pcTables CHARACTER
 
pcPhysicalTables CHARACTER
 
pcMapping CHARACTER
 
Top

DataSource (character, character, handle, character)

Parameters:
pcTables CHARACTER
 
pcPhysicalTables CHARACTER
 
hTempSource HANDLE
 
pcMapping CHARACTER
 
Top

DataSource (handle, character, character, character)

Parameters:
hTempSource HANDLE
 
pcTables CHARACTER
 
pcPhysicalTables CHARACTER
 
pcMapping CHARACTER
 


Property Detail
Top

INTEGER BatchSize

Returns INTEGER
 
Top

OpenEdge.DataAdmin.DataAccess.IDataAccess DataAccess

Returns OpenEdge.DataAdmin.DataAccess.IDataAccess
 
Top

OpenEdge.DataAdmin.DataSource.DatabaseInfo DatabaseInfo

Returns OpenEdge.DataAdmin.DataSource.DatabaseInfo
 
Top

HANDLE DataBuffer

Returns HANDLE
 
Top

HANDLE DataSourceHandle

Returns HANDLE
 
Top

CHARACTER FieldMapping

Returns CHARACTER
 
Top

Progress.Lang.Error FillError

Returns Progress.Lang.Error
 
Top

CHARACTER FillMode

Returns CHARACTER
 
Top

LOGICAL Lazy

Returns LOGICAL
 
Top

INTEGER NumRecords

Returns INTEGER
 
Top

HANDLE ParentRelation

Returns HANDLE
 
Top

CHARACTER SaveChildNames

Returns CHARACTER
 
Top

HANDLE SaveSourceHandle

Returns HANDLE
 
Top

CHARACTER Url

Returns CHARACTER
 
Top

OpenEdge.DataAdmin.Lang.WebUtil WebUtil

Returns OpenEdge.DataAdmin.Lang.WebUtil