%TSQL.Impl
class %TSQL.Impl extends %Library.RegisteredObject
Implementation of TSQL scalar and other functions not supported by Cache SQL
Method Inventory
- CHARINDEX()
- DATALENGTH()
- FLOOR()
- Find()
- IFNULL()
- IsStream()
- LEN()
- REPLACE()
- ROUND()
- STUFF()
- SUBSTRING()
- ZBITWISEAND()
- ZBITWISEOR()
- ZBITWISEXOR()
- ZCONVERRFROMTSQL()
- ZFORMATMESSAGE()
- ZLIKETOCOSPATTERN()
- ZLIKETOCOSPATTERNS()
- ZPATINDEXFB()
- ZPATINDEXL()
- ZPATINDEXLR()
- ZPATINDEXPL()
- ZPATINDEXPLR()
- ZPATINDEXPN()
- ZPATINDEXU()
- ZPATINDEXUL()
- ZPATINDEXULR()
- ZPATTERNMATCH()
- ZRAND()
- ZREMAMPM()
- ZRPATINDEX()
- ZRPATINDEXPLP()
- ZWITHDATETIME()
Methods
Implement CHARINDEX(tofind,findin[,startat])
Implement DATALENGTH(item)
Implement FLOOR for COS context
Look for LookIn in LookFor starting at StartLook (defaults to 1)
If the string isn't found then 0 is returned
If the string is found then the 1-based offset to the start of LookFor in LookIn is returned
Implement IFNULL(expr1,expr2[,expr3])
Is the given value a stream id?
- if so: return 1 and set StreamOref
- otherwise: return 0 and set StreamOref to $$$NULLOREF
Implement LEN for COS context
Implement REPLACE(expr,old,new)
Implement ROUND(number,length,function)
Implement STUFF(sourcestring,startpos,replacelength,replacestring)
Implement SUBSTRING(item, start, length)
Implement bitwiseAND
Implement bitwiseOR
Implement bitwiseXOR
Translate a TSQL error code to a SQLCODE
Format a RAISERROR message with the given arguments
Given a LIKE pattern and optional LIKE ESCAPE, return the corresponding COS pattern (non-SQL strings)
Given a LIKE pattern and optional LIKE ESCAPE, return the corresponding COS pattern (SQL strings)
PATINDEX for anything that isn't covered above (FB=fallback) - returns 0/1
- will not give the correct result for a pattern beginning with "%"
PATINDEX for: literal - returns 0/1
PATINDEX for: literal rest - returns 0/1
PATINDEX for: percent literal - returns 0/position of literal
PATINDEX for: percent literal rest - 0/returns position of literal
PATINDEX for: percent non-literal - returns 0/position of non-literal
PATINDEX for: underline(s) - returns 0/1
PATINDEX for: underline(s) literal - returns 0/1
PATINDEX for: underline(s) literal rest - returns 0/1
Implement ZRAND(scalefactor)
Implement ZREMAMPM(item) to remove the "AM" or "PM" if necessary
PATINDEX for non-literal patterns
PATINDEX for "%"+XXX+"%" patterns
Implement ZWITHDATETIME(item) to append a date of 1/1/1900 and/or a time of midnight to the item if necessary
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()