Class InStrSqlFunction
java.lang.Object
com.gigaspaces.query.sql.functions.SqlFunction
com.gigaspaces.query.sql.functions.InStrSqlFunction
Built in string sql function to get the position of the first occurrence of a substring in a
string.
- Since:
- 11.0.0
- Author:
- Tamir Schwarz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(SqlFunctionExecutionContext context) inStr is an SQL convention (Not Java's), in the sense that the first index is 1 and not 0.Methods inherited from class com.gigaspaces.query.sql.functions.SqlFunction
assertNumberOfArguments, assertNumberOfArguments, fromSqlTypeName, isString, isWholeNumber
-
Constructor Details
-
InStrSqlFunction
public InStrSqlFunction()
-
-
Method Details
-
apply
inStr is an SQL convention (Not Java's), in the sense that the first index is 1 and not 0.- Specified by:
applyin classSqlFunction- Parameters:
context- contains two arguments of type string.- Returns:
- the index of the first occurrence of context.getArgument(1) in context.getArgument(0). If not a substring, return value of 0.
-