Class SY_RecordSet

Inherits

SY_Service

Properties

LOCAL cMainTable$="*SKIP*"  

[string] Table name for an instance of this object set in the ON_CREATE

LOCAL cIsSysDB=isFALSE  
[bool] True if table exists in MAS_SYSTEM
LOCAL c.Rs.DefaultBegin$=$00$  
[string] Default Record Set Values
LOCAL c.Rs.DefaultEnd$=$FE$  
LOCAL c.Rs.DefaultFilter$="1"  
LOCAL c.Rs.DefaultIndex$="kPRIMARY"  
LOCAL c.Rs.DefaultBatchSize=-1  
LOCAL c.Rs.DefaultHexEncodeKeyColumn$="$FE$+ID$+$FE$"  
LOCAL c.Rs.DefaultFormatedCodeColumn$="$FE$+FORMATTEDCODE$+$FE$"  
LOCAL c.Rs.DefaultFormatedNameColumn$="$FE$+FORMATTEDNAME$+$FE$"  
LOCAL c.Rs.DefaultHexEncodeKeyExpression$="$FE$+HTA(KEC(cFH, KNO=0))+$FE$"  
LOCAL c.Rs.DefaultFormatedCodeExpression$="$FE$+SUB(KEC(cFH, KNO=0), $00$, $20$)+$FE$"  
LOCAL c.Rs.NameFormat$="cMainTable$"+"+"+QUO+"_svc.pvc;GET_NAME_FORMAT"+QUO  
[string] Function call used to obtain the name format from the table's native service object.
LOCAL c.Rs.CodeFormat$="cMainTable$"+"+"+QUO+"_svc.pvc;GET_CODE_FORMAT"+QUO  
[string] Function call used to obtain the code or display key format from the table's native service object.

Methods

FUNCTION FindRecord(rs.key$, rs.record$)  

Get a single record based on the current record set criteria

ParameterDescription
rs.key$ [input, string] The key value for the record to find.
rs.record$ [output, string] A delimited list of values as defined by the colsToSelect$ argument.
Returns [boolean] returns retSUCCESS if the record was found otherwise retFAILURE.
FUNCTION FindRecordById(rs.hexKey$, rs.record$)  

Converts the given hex encoded key to ascii and gets a single record based on the current record set criteria.

ParameterDescription
rs.hexKey$ [input, string] The hex encoded key value for the record to find.
rs.record$ [output, string] A delimited list of values as defined by the colsToSelect$ argument.
Returns [boolean] returns retSUCCESS if the record was found otherwise retFAILURE.
FUNCTION GetRecordSet(rs.recordSet$)  
FUNCTION GetRecordSet(rs.recordSet$, rs.batchSize)  

Return a record set based on current record set criteria.

ParameterDescription
rs.recordSet$ [output, string] A delimited list of values as defined by the colsToSelect$ argument. Each 'record' will be separated by a SEP (Hex 8A) character.
rs.batchSize{optional} [input, numeric] Defines the number of records returned in a record set. Default zero, will return all (remaining) records.
Returns [boolean] returns 1 - if a record set was returned or 0 - if the returned set is empty (end of record set)
FUNCTION ResetRecordLimit(rs.limit)  

This function will set the limit (top) number of records returned and reset the current count to zero.

ParameterDescription
rs.limit [input, integer] The number of records (top) to be returned.
Returns [boolean] returns retSUCCESS
FUNCTION SetDecimalPrecision(rs.decimalPlaces)  

This function will set the decimal precision (number of decimal places) for numerics retrieved will be set too.

ParameterDescription
rs.decimalPlaces [input, integer] Integer value for number of decimal places to set retrieved numerics too.
Returns [boolean] returns TRUE (1) if successful or FAILURE (0) if unsuccessful, in this event previous precision will remain.
FUNCTION SetRecordSet(rs.colsToSelect$)  
FUNCTION SetRecordSet(rs.colsToSelect$, rs.begin$, rs.end$, rs.filter$)  
FUNCTION SetRecordSet(rs.colsToSelect$, rs.begin$, rs.end$, rs.filter$, rs.index$)  
FUNCTION SetRecordSet(rs.colsToSelect$, rs.begin$, rs.end$, rs.filter$, rs.index$, rs.top)  

Configure and setup this instance to return the desired set of records.

ParameterDescription
rs.colsToSelect$ [input, string] Concatenated list of columns to be returned in values$, this needs to be able to be evaulated by an EVS() function.
rs.begin${optional} [input, string] Beginning value to seed the select, if not provided will begin at ""
rs.end${optional} [input, string] Ending value to terminate select, if not provided will end at hex(fe)
rs.filter$ [input, string] A filter that needs to be of valid syntax in a ProvideX WHERE clause.
rs.index${optional} [input, string] Index for the order to return values in, if left blank the best performance index will be utilized.
rs.top{optional} [input, numeric] Top/max number of records to return. Default is all records matching the criteria are returned.
Returns [boolean] returns 0 - if an error occurred or 1 - if a record set was successfully initialzed.

Properties inherited from: SY_Service

BOF, CurrentBrowseIndex$, CurrentIndex$, EOF, SecurityAccess

Methods inherited from: SY_Service

BindVariable(), CheckMainTable(), Clear(), Find(), FindById(), GetChildHandle(), GetChildKeyReference$(), GetColumns$(), GetDataSources$(), GetDataSourcesAddl$(), GetJson$(), GetKey$(), GetKeyColumns$(), GetKeyPadded$(), GetPartialRecord(), GetRecord(), GetRecordCount(), GetRecordEx(), GetResultSets(), GetTable$(), GetTablePath$(), GetValue(), GetValues(), IsValid(), MoveFirst(), MoveLast(), MoveNext(), MovePrevious(), ReadAdditional(), SetBrowseFilter(), SetBrowseIndex(), SetCacheMode(), SetIndex(), SetKeyValue(), SetParentColumns(), SetParentHandle(), SetUIHandle(), PERFORM ClearEditRcd(), FormatJson$(), GetAddlDataSources(), GetDateColumns$(), InitChildCollection(), MoveFirstLast(), MoveNextPrevious(), OpenMainTable(), ParseKeyDef(), PrepareKeyDef(), ReadRec(), ResolveColumnList$(), SetControls(), SetCurrentKey(), UseKeyColl()