Class SY_SDataParser

This class is meant to be inherited by SY_SDataServer, not instantiated. It handles all parsing of the serialized property strings that are passed between the C# and ProvideX parts of our SData provider.

Known SubClasses

SY_SDataServer

Properties

No Properties

Methods

FUNCTION Contains(list1$, list2$)  
FUNCTION Contains(list1$, list2$, missingList$)  

Does list1$ contain all of the elements of list2$? The comparison doesn't care about order, number, or case, but it does care about whitespace. This is useful for checking if the list of fields in an SData request includes all of the key fields for a table.

ParameterDescription
list1$ [input, string] Comma delimited list of elements
list2$ [input, string] Comma delimited list of elements to look for in list1$
missingList${optional} [output, string] Comma delimited list of the elements from list2$ that are not in list1$
Returns [boolean] Whether list1$ contains list2$
FUNCTION CreatePropertyString(inRecord$, inIOList$, inResourceName$, outString$)  

Creates a special serialized property string from a set of variables and values.

ParameterDescription
inRecord$ [input, string] A ProvideX record variable containing the values to be serialized
inIOList$ [input, iolist] A ProvideX iolist describing the names of the variables to be serialized
inResourceName$ [input, string] The name of the resource whose properties we are serializing
outString$ [output, string] The serialized property string
Returns [boolean] True
FUNCTION CreatePropertyString(busObj, inResourceName$, outString$)  

Creates a special serialized property string describing the currently selected record in a business object and its children.

ParameterDescription
busObj$ [input, object] A business object. SetKey() on the record you want to create a property string for first!
inResourceName$ [input, string] The name of the resource whose properties we are serializing
outString$ [output, string] The serialized property string
Returns [boolean] True
FUNCTION ParsePropertyString(inString$, outFields$, outValues$, separator$)  

Parses a special serialized property string into a set of variables and values.

ParameterDescription
inString$ [input, string] The serialized property string
outFields$ [output, string] A comma delimited list of the variable names from the property string
outValues$ [output, string] A separator$ delimited list of the values from the property string
separator$ [output, string] The single character used to delimit outValues$. This will be the ProvideX SEP character unless the data itself contains SEPs, in which case every effort will be made to use a character not found in the data.
Returns [boolean] Whether the property string was successfully parsed or not
FUNCTION LOCAL AppendFieldsAndValues(fields$, values$, newFields$, newValues$, separator$)  
FUNCTION LOCAL CreatePropertySubstring(inRecord$, inIOList$, inResourceName$, outString$)  
FUNCTION LOCAL CreatePropertySubstring(busObj, inResourceName$, outString$)  
FUNCTION LOCAL DetermineSeparator(inString$, separator$)  
FUNCTION LOCAL ParsePropertySubstring(inString$, outFields$, outValues$, separator$, prefix$)  

Properties inherited from: SY_SDataConstant

constSpecialResourceSuffix$, constSpecialResourceSuffix2$, constMaxFieldLength, constMaxTableNameLength, constResourceTypeLength, retHttpOK, retHttpCREATED, retHttpBADREQUEST, retHttpUNAUTHORIZED, retHttpFORBIDDEN, retHttpNOTFOUND, retHttpCONFLICT, retHttpGONE, retHttpPRECONDITIONFAILED, retHttpINTERNALSERVERERROR, retHttpSERVICEUNAVAILABLE, resourceTypeSIMPLE$, resourceTypeDETAIL$, resourceTypeDISTRIBUTION$, resourceTypeSY_SalesTaxSchedule$, resourceTypeSY_SalesTaxScheduleDetail$, resourceTypeAP_ManualCheckDetail$, resourceTypeAP_ManualCheckInvDetail$, resourceTypeSO_SalesOrderPayment$, resourceTypeSO_InvoicePayment$, resourceTypeIM_TransactionDetail$, resourceTypeIM_TransactionTierDist$