Skip to main content

%Library.Collation

class %Library.Collation

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.

Method Inventory

Methods

classmethod AlphaUp(%val As %String) as %String
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.

classmethod Collate(val As %String, transSpec As %String = "", length As %String = "") as %String
Converts a logical value to %COLLATE collation
classmethod Exact(%val As %String) as %String
Performs no transformation; the index value is exactly the logical value.
classmethod FMDEQDate(fmd As %FilemanDate, d As %Date) as %Boolean
Compares a %FilemanDate to a %Date value with the = operator.
classmethod FMDEQPT(fmd As %FilemanDate, pt As %PosixTime) as %Boolean
These methods deal with comparing %Library.FilemanDate values with %Library.PosixTime Compares a %FilemanDate to a %PosixTime value with the = operator.
classmethod FMDEQTS(fmd As %FilemanDate, ts As %TimeStamp) as %Boolean
These methods deal with comparing %Library.FilemanDate values with %Library.TimeStamp Compares a %FilemanDate to a %TimeStamp value with the = operator.
classmethod FMDGEDate(fmd As %FilemanDate, d As %Date) as %Boolean
Compares a %FilemanDate to a %Date value with the '< operator.
classmethod FMDGEPT(fmd As %FilemanDate, pt As %PosixTime) as %Boolean
Compares a %FilemanDate to a %PosixTime value with the '< operator.
classmethod FMDGETS(fmd As %FilemanDate, ts As %TimeStamp) as %Boolean
Compares a %FilemanDate to a %TimeStamp value with the '< operator.
classmethod FMDGTDate(fmd As %FilemanDate, d As %Date) as %Boolean
Compares a %FilemanDate to a %Date value with the > operator.
classmethod FMDGTPT(fmd As %FilemanDate, pt As %PosixTime) as %Boolean
Compares a %FilemanDate to a %PosixTime value with the > operator.
classmethod FMDGTTS(fmd As %FilemanDate, ts As %TimeStamp) as %Boolean
Compares a %FilemanDate to a %TimeStamp value with the > operator.
classmethod FMDLEDate(fmd As %FilemanDate, d As %Date) as %Boolean
Compares a %FilemanDate to a %Date value with the '> operator.
classmethod FMDLEPT(fmd As %FilemanDate, pt As %PosixTime) as %Boolean
Compares a %FilemanDate to a %PosixTime value with the '> operator.
classmethod FMDLETS(fmd As %FilemanDate, ts As %TimeStamp) as %Boolean
Compares a %FilemanDate to a %TimeStamp value with the '> operator.
classmethod FMDLTDate(fmd As %FilemanDate, d As %Date) as %Boolean
Compares a %FilemanDate to a %Date value with the < operator.
classmethod FMDLTPT(fmd As %FilemanDate, pt As %PosixTime) as %Boolean
Compares a %FilemanDate to a %PosixTime value with the < operator.
classmethod FMDLTTS(fmd As %FilemanDate, ts As %TimeStamp) as %Boolean
Compares a %FilemanDate to a %TimeStamp value with the < operator.
classmethod FMDNEDate(fmd As %FilemanDate, d As %Date) as %Boolean
Compares a %FilemanDate to a %Date value with the '= operator.
classmethod FMDNEPT(fmd As %FilemanDate, pt As %PosixTime) as %Boolean
Compares a %FilemanDate to a %PosixTime value with the '= operator.
classmethod FMDNETS(fmd As %FilemanDate, ts As %TimeStamp) as %Boolean
Compares a %FilemanDate to a %TimeStamp value with the '= operator.
classmethod FMTSEQDate(ts As %FilemanTimeStamp, d As %Date) as %Boolean
Compares a %FilemanTimeStamp to a %Date value with the = operator.
classmethod FMTSEQPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) as %Boolean
Compares a %FilemanTimeStamp to a %PosixTime value with the = operator.
classmethod FMTSEQTS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) as %Boolean
Compares a %FilemanTimeStamp to a %TimeStamp value with the = operator.
classmethod FMTSGEDate(ts As %FilemanTimeStamp, d As %Date) as %Boolean
Compares a %FilemanTimeStamp to a %Date value with the '< operator.
classmethod FMTSGEPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) as %Boolean
Compares a %FilemanTimeStamp to a %PosixTime value with the >= operator.
classmethod FMTSGETS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) as %Boolean
Compares a %FilemanTimeStamp to a %TimeStamp value with the >= operator.
classmethod FMTSGTDate(ts As %FilemanTimeStamp, d As %Date) as %Boolean
Compares a %FilemanTimeStamp to a %Date value with the > operator.
classmethod FMTSGTPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) as %Boolean
Compares a %FilemanTimeStamp to a %PosixTime value with the > operator.
classmethod FMTSGTTS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) as %Boolean
Compares a %FilemanTimeStamp to a %TimeStamp value with the > operator.
classmethod FMTSLEDate(ts As %FilemanTimeStamp, d As %Date) as %Boolean
Compares a %FilemanTimeStamp to a %Date value with the '> operator.
classmethod FMTSLEPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) as %Boolean
Compares a %FilemanTimeStamp to a %PosixTime value with the <= operator.
classmethod FMTSLETS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) as %Boolean
Compares a %FilemanTimeStamp to a %TimeStamp value with the <= operator.
classmethod FMTSLTDate(ts As %FilemanTimeStamp, d As %Date) as %Boolean
Compares a %FilemanTimeStamp to a %Date value with the < operator.
classmethod FMTSLTPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) as %Boolean
Compares a %FilemanTimeStamp to a %PosixTime value with the < operator.
classmethod FMTSLTTS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) as %Boolean
Compares a %FilemanTimeStamp to a %TimeStamp value with the < operator.
classmethod FMTSNEDate(ts As %FilemanTimeStamp, d As %Date) as %Boolean
Compares a %FilemanTimeStamp to a %Date value with the '= operator.
classmethod FMTSNEPT(fmts As %Library.FilemanTimeStamp, pt As %Library.PosixTime) as %Boolean
Compares a %FilemanTimeStamp to a %PosixTime value with the '= operator.
classmethod FMTSNETS(fmts As %Library.FilemanTimeStamp, ts As %Library.TimeStamp) as %Boolean
Compares a %FilemanTimeStamp to a %TimeStamp value with the '= operator.
classmethod MVDEQDate(mvd As %MV.Date, d As %Date) as %Boolean
---------------------- 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.
classmethod MVDGEDate(mvd As %MV.Date, d As %Date) as %Boolean
Compares a %MV.Date to a %Date value with the '< operator.
classmethod MVDGTDate(mvd As %MV.Date, d As %Date) as %Boolean
Compares a %MV.Date to a %Date value with the > operator.
classmethod MVDLEDate(mvd As %MV.Date, d As %Date) as %Boolean
Compares a %MV.Date to a %Date value with the '> operator.
classmethod MVDLTDate(mvd As %MV.Date, d As %Date) as %Boolean
Compares a %MV.Date to a %Date value with the < operator.
classmethod MVDNEDate(mvd As %MV.Date, d As %Date) as %Boolean
Compares a %MV.Date to a %Date value with the '= operator.
classmethod Minus(%val As %String) as %String
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.

classmethod Mvr(%val As %String) as %String
Converts a logical value to MVR collation
classmethod PTEQDate(pt As %PosixTime, d As %Date) as %Boolean
Compares a %PosixTime to a %Date value with the = operator.
classmethod PTEQTS(pt As %PosixTime, ts As %TimeStamp) as %Boolean
Compares a %PosixTime to a %TimeStamp value with the = operator.
classmethod PTGEDate(pt As %TimeStamp, d As %Date) as %Boolean
Compares a %PosixTime to a %Date value with the '< operator.
classmethod PTGETS(pt As %PosixTime, ts As %TimeStamp) as %Boolean
Compares a %PosixTime to a %TimeStamp value with the '< operator.
classmethod PTGTDate(pt As %TimeStamp, d As %Date) as %Boolean
Compares a %PosixTime to a %Date value with the > operator.
classmethod PTGTTS(pt As %PosixTime, ts As %TimeStamp) as %Boolean
Compares a %PosixTime to a %TimeStamp value with the > operator.
classmethod PTLEDate(pt As %TimeStamp, d As %Date) as %Boolean
Compares a %PosixTime to a %Date value with the '> operator.
classmethod PTLETS(pt As %PosixTime, ts As %TimeStamp) as %Boolean
Compares a %PosixTime to a %TimeStamp value with the '> operator.
classmethod PTLTDate(pt As %TimeStamp, d As %Date) as %Boolean
Compares a %PosixTime to a %Date value with the < operator.
classmethod PTLTTS(pt As %PosixTime, ts As %TimeStamp) as %Boolean
Compares a %PosixTime to a %TimeStamp value with the < operator.
classmethod PTNEDate(pt As %TimeStamp, d As %Date) as %Boolean
Compares a %PosixTime to a %Date value with the '= operator.
classmethod PTNETS(pt As %PosixTime, ts As %TimeStamp) as %Boolean
Compares a %PosixTime to a %TimeStamp value with the '= operator.
classmethod Plus(%val As %String) as %String
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.

classmethod Space(%val As %String) as %String
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.

classmethod SqlString(%val As %String, maxlen As %Integer = 32768) as %String
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.

classmethod SqlUpper(%val As %String, maxlen As %Integer = 32768) as %String
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.

classmethod String(%val As %String, maxlen As %Integer = 32768) as %String
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.

classmethod TSEQDate(ts As %TimeStamp, d As %Date) as %Boolean
Compares a %TimeStamp to a %Date value with the = operator.
classmethod TSEQMVDate(ts As %TimeStamp, d As %MV.Date) as %Boolean
---------------------- These methods deal with comparing %MV.Date values with %Library.TimeStamp ---------------------- Compares a %TimeStamp to a %MV.Date value with the = operator.
classmethod TSGEDate(ts As %TimeStamp, d As %Date) as %Boolean
Compares a %TimeStamp to a %Date value with the '< operator.
classmethod TSGEMVDate(ts As %TimeStamp, d As %MV.Date) as %Boolean
Compares a %TimeStamp to a %MV.Date value with the '< operator.
classmethod TSGTDate(ts As %TimeStamp, d As %Date) as %Boolean
Compares a %TimeStamp to a %Date value with the > operator.
classmethod TSGTMVDate(ts As %TimeStamp, d As %MV.Date) as %Boolean
Compares a %TimeStamp to a %MV.Date value with the > operator.
classmethod TSLEDate(ts As %TimeStamp, d As %Date) as %Boolean
Compares a %TimeStamp to a %Date value with the '> operator.
classmethod TSLEMVDate(ts As %TimeStamp, d As %MV.Date) as %Boolean
Compares a %TimeStamp to a %MV.Date value with the '> operator.
classmethod TSLTDate(ts As %TimeStamp, d As %Date) as %Boolean
Compares a %TimeStamp to a %Date value with the < operator.
classmethod TSLTMVDate(ts As %TimeStamp, d As %MV.Date) as %Boolean
Compares a %TimeStamp to a %MV.Date value with the < operator.
classmethod TSNEDate(ts As %TimeStamp, d As %Date) as %Boolean
Compares a %TimeStamp to a %Date value with the '= operator.
classmethod TSNEMVDate(ts As %TimeStamp, d As %MV.Date) as %Boolean
Compares a %TimeStamp to a %MV.Date value with the '= operator.
classmethod Truncate(%val As %String, len As %Integer) as %String
Converts a logical value to exact colation with a defined length limit
classmethod Upper(%val As %String) as %String
Converts a logical value to upper case without removing any characters.

Subclasses

FeedbackOpens in a new tab