%Library.Collation
Class %Library.Collation [ Not ProcedureBlock, System = 2 ]
This class defines the set of common index transformation (or collation) methods.
An index transformation is used to tranform logical data values into values used by indices.
For example, you may wish that a query by name finds the same results for both "ELVIS" and "elvis". Using a case-insensitive index transformation, such as String, will accomplish this. If you want an exact match, use Exact.
Index transformations are specified via a property's COLLATION parameter. Every datatype has a default COLLATION value, which matches one of the methods of the %Collation class. The COLLATION parameter can be overwritten by an individual property or by a specific index definition.
Note that changing a property's COLLATION value will corrupt any index values currently stored for that property and will require you to manually repopulate the index.
Methods
AlphaUp
ClassMethod AlphaUp(%val As %String) As %String [ CodeMode = expression ]
Converts a logical value to upper case, strips all punctuation and white space (except for ',' and '?').
This method is included for compatability with earlier products; use String instead.
Exact
ClassMethod Exact(%val As %String) As %String [ CodeMode = expression ]
Performs no transformation; the index value is exactly the logical value.
Minus
ClassMethod Minus(%val As %String) As %String [ CodeMode = expression ]
Prepends a minus ('-') sign to the logical value.
This method is included for compatability with earlier products; you should not need it in new applications.
Plus
ClassMethod Plus(%val As %String) As %String [ CodeMode = expression ]
Prepends a plus ('+') sign to the logical value.
This method is included for compatability with earlier products; you should not need it in new applications.
Space
ClassMethod Space(%val As %String) As %String [ CodeMode = expression ]
Prepends a space (' ') character to the logical value.
This method is included for compatability with earlier products; you should not need it in new applications.
SqlString
ClassMethod SqlString(%val As %String, maxlen As %Integer = 32768) As %String [ CodeMode = expression ]
Prepends a space to force string collation and strips trailing whitespace.
This method is used to insure that strings are collated case-sensitively and that numeric string values are collated correctly.
SqlUpper
ClassMethod SqlUpper(%val As %String, maxlen As %Integer = 32768) As %String [ CodeMode = expression ]
Converts a logical value to upper case, strips trailing whitespace and prepends a space to force string collation.
This method is used to insure that strings are collated case-insensitively and that numeric string values are collated correctly.
String
ClassMethod String(%val As %String, maxlen As %Integer = 32768) As %String [ CodeMode = expression ]
Converts a logical value to upper case, strips all punctuation and white space (except for ',').
This method is used to insure that strings are collated case-insensitively and that numeric string values are collated correctly.
Upper
ClassMethod Upper(%val As %String) As %String [ CodeMode = expression ]
Converts a logical value to upper case without removing any characters.
Mvr
ClassMethod Mvr(%val As %String) As %String [ CodeMode = expression ]
Converts a logical value to MVR collation
Truncate
ClassMethod Truncate(%val As %String, len As %Integer) As %String [ CodeMode = expression ]
Converts a logical value to exact colation with a defined length limit
Collate
ClassMethod Collate(val As %String, transSpec As %String = "", length As %String = "") As %String [ ProcedureBlock = 1 ]
Converts a logical value to %COLLATE collation
TSEQDate
ClassMethod TSEQDate(ts As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %Date value with the = operator.
TSGTDate
ClassMethod TSGTDate(ts As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %Date value with the > operator.
TSGEDate
ClassMethod TSGEDate(ts As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %Date value with the '< operator.
TSLTDate
ClassMethod TSLTDate(ts As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %Date value with the < operator.
TSLEDate
ClassMethod TSLEDate(ts As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %Date value with the '> operator.
TSNEDate
ClassMethod TSNEDate(ts As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %Date value with the '= operator.
PTEQDate
ClassMethod PTEQDate(pt As %PosixTime, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %PosixTime to a %Date value with the = operator.
PTGTDate
ClassMethod PTGTDate(pt As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %PosixTime to a %Date value with the > operator.
PTGEDate
ClassMethod PTGEDate(pt As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %PosixTime to a %Date value with the '< operator.
PTLTDate
ClassMethod PTLTDate(pt As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %PosixTime to a %Date value with the < operator.
PTLEDate
ClassMethod PTLEDate(pt As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %PosixTime to a %Date value with the '> operator.
PTNEDate
ClassMethod PTNEDate(pt As %TimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %PosixTime to a %Date value with the '= operator.
PTEQTS
ClassMethod PTEQTS(pt As %PosixTime, ts As %TimeStamp) As %Boolean
Compares a %PosixTime to a %TimeStamp value with the = operator.
PTGTTS
ClassMethod PTGTTS(pt As %PosixTime, ts As %TimeStamp) As %Boolean
Compares a %PosixTime to a %TimeStamp value with the > operator.
PTGETS
ClassMethod PTGETS(pt As %PosixTime, ts As %TimeStamp) As %Boolean
Compares a %PosixTime to a %TimeStamp value with the '< operator.
PTLTTS
ClassMethod PTLTTS(pt As %PosixTime, ts As %TimeStamp) As %Boolean
Compares a %PosixTime to a %TimeStamp value with the < operator.
PTLETS
ClassMethod PTLETS(pt As %PosixTime, ts As %TimeStamp) As %Boolean
Compares a %PosixTime to a %TimeStamp value with the '> operator.
PTNETS
ClassMethod PTNETS(pt As %PosixTime, ts As %TimeStamp) As %Boolean
Compares a %PosixTime to a %TimeStamp value with the '= operator.
FMTSEQPT
ClassMethod FMTSEQPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %PosixTime value with the = operator.
FMTSNEPT
ClassMethod FMTSNEPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %PosixTime value with the '= operator.
FMTSGTPT
ClassMethod FMTSGTPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %PosixTime value with the > operator.
FMTSGEPT
ClassMethod FMTSGEPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %PosixTime value with the >= operator.
FMTSLTPT
ClassMethod FMTSLTPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %PosixTime value with the < operator.
FMTSLEPT
ClassMethod FMTSLEPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %PosixTime value with the <= operator.
FMTSEQTS
ClassMethod FMTSEQTS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %TimeStamp value with the = operator.
FMTSNETS
ClassMethod FMTSNETS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %TimeStamp value with the '= operator.
FMTSGTTS
ClassMethod FMTSGTTS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %TimeStamp value with the > operator.
FMTSGETS
ClassMethod FMTSGETS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %TimeStamp value with the >= operator.
FMTSLTTS
ClassMethod FMTSLTTS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %TimeStamp value with the < operator.
FMTSLETS
ClassMethod FMTSLETS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %TimeStamp value with the <= operator.
FMTSEQDate
ClassMethod FMTSEQDate(ts As %FilemanTimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %Date value with the = operator.
FMTSGTDate
ClassMethod FMTSGTDate(ts As %FilemanTimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %Date value with the > operator.
FMTSGEDate
ClassMethod FMTSGEDate(ts As %FilemanTimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %Date value with the '< operator.
FMTSLTDate
ClassMethod FMTSLTDate(ts As %FilemanTimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %Date value with the < operator.
FMTSLEDate
ClassMethod FMTSLEDate(ts As %FilemanTimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %Date value with the '> operator.
FMTSNEDate
ClassMethod FMTSNEDate(ts As %FilemanTimeStamp, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanTimeStamp to a %Date value with the '= operator.
FMDEQDate
ClassMethod FMDEQDate(fmd As %FilemanDate, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %Date value with the = operator.
FMDGTDate
ClassMethod FMDGTDate(fmd As %FilemanDate, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %Date value with the > operator.
FMDGEDate
ClassMethod FMDGEDate(fmd As %FilemanDate, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %Date value with the '< operator.
FMDLTDate
ClassMethod FMDLTDate(fmd As %FilemanDate, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %Date value with the < operator.
FMDLEDate
ClassMethod FMDLEDate(fmd As %FilemanDate, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %Date value with the '> operator.
FMDNEDate
ClassMethod FMDNEDate(fmd As %FilemanDate, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %Date value with the '= operator.
FMDEQPT
ClassMethod FMDEQPT(fmd As %FilemanDate, pt As %PosixTime) As %Boolean [ CodeMode = expression ]
These methods deal with comparing %Library.FilemanDate values with %Library.PosixTime Compares a %FilemanDate to a %PosixTime value with the = operator.
FMDGTPT
ClassMethod FMDGTPT(fmd As %FilemanDate, pt As %PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %PosixTime value with the > operator.
FMDGEPT
ClassMethod FMDGEPT(fmd As %FilemanDate, pt As %PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %PosixTime value with the '< operator.
FMDLTPT
ClassMethod FMDLTPT(fmd As %FilemanDate, pt As %PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %PosixTime value with the < operator.
FMDLEPT
ClassMethod FMDLEPT(fmd As %FilemanDate, pt As %PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %PosixTime value with the '> operator.
FMDNEPT
ClassMethod FMDNEPT(fmd As %FilemanDate, pt As %PosixTime) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %PosixTime value with the '= operator.
FMDEQTS
ClassMethod FMDEQTS(fmd As %FilemanDate, ts As %TimeStamp) As %Boolean [ CodeMode = expression ]
These methods deal with comparing %Library.FilemanDate values with %Library.TimeStamp Compares a %FilemanDate to a %TimeStamp value with the = operator.
FMDGTTS
ClassMethod FMDGTTS(fmd As %FilemanDate, ts As %TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %TimeStamp value with the > operator.
FMDGETS
ClassMethod FMDGETS(fmd As %FilemanDate, ts As %TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %TimeStamp value with the '< operator.
FMDLTTS
ClassMethod FMDLTTS(fmd As %FilemanDate, ts As %TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %TimeStamp value with the < operator.
FMDLETS
ClassMethod FMDLETS(fmd As %FilemanDate, ts As %TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %TimeStamp value with the '> operator.
FMDNETS
ClassMethod FMDNETS(fmd As %FilemanDate, ts As %TimeStamp) As %Boolean [ CodeMode = expression ]
Compares a %FilemanDate to a %TimeStamp value with the '= operator.
MVDEQDate
ClassMethod MVDEQDate(mvd As %MV.Date, d As %Date) As %Boolean [ CodeMode = expression ]
---------------------- These methods deal with comparing %MV.Date values with %Library.Date The MultiValue start date is 01/01/1968
ObjectScript date is 01/01/1841
To convert an ObjectScript date ($h) to a MultiValue date:
MVdate = ObjectScript date - 46385
To convert a MultiValue date to an ObjectScript date:
ObjectScript date = MVdate + 46385
---------------------- Compares a %MV.Date to a %Date value with the = operator.
MVDGTDate
ClassMethod MVDGTDate(mvd As %MV.Date, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %MV.Date to a %Date value with the > operator.
MVDGEDate
ClassMethod MVDGEDate(mvd As %MV.Date, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %MV.Date to a %Date value with the '< operator.
MVDLTDate
ClassMethod MVDLTDate(mvd As %MV.Date, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %MV.Date to a %Date value with the < operator.
MVDLEDate
ClassMethod MVDLEDate(mvd As %MV.Date, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %MV.Date to a %Date value with the '> operator.
MVDNEDate
ClassMethod MVDNEDate(mvd As %MV.Date, d As %Date) As %Boolean [ CodeMode = expression ]
Compares a %MV.Date to a %Date value with the '= operator.
TSEQMVDate
ClassMethod TSEQMVDate(ts As %TimeStamp, d As %MV.Date) As %Boolean [ CodeMode = expression ]
---------------------- These methods deal with comparing %MV.Date values with %Library.TimeStamp ---------------------- Compares a %TimeStamp to a %MV.Date value with the = operator.
TSGTMVDate
ClassMethod TSGTMVDate(ts As %TimeStamp, d As %MV.Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %MV.Date value with the > operator.
TSGEMVDate
ClassMethod TSGEMVDate(ts As %TimeStamp, d As %MV.Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %MV.Date value with the '< operator.
TSLTMVDate
ClassMethod TSLTMVDate(ts As %TimeStamp, d As %MV.Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %MV.Date value with the < operator.
TSLEMVDate
ClassMethod TSLEMVDate(ts As %TimeStamp, d As %MV.Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %MV.Date value with the '> operator.
TSNEMVDate
ClassMethod TSNEMVDate(ts As %TimeStamp, d As %MV.Date) As %Boolean [ CodeMode = expression ]
Compares a %TimeStamp to a %MV.Date value with the '= operator.