Class RDBMSStringLengthFunction
java.lang.Object
com.kingsrook.qqq.backend.module.rdbms.fieldfunctions.RDBMSStringLengthFunction
- All Implemented Interfaces:
BackendFieldFunctionAdapterInterface,RDBMSFieldFunctionAdapterInterface,Serializable
RDBMS adapter for the
StringLengthFunction that generates a
CHAR_LENGTH(col) SQL expression.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwrapColumnName(String escapedColumnName, FieldFunction fieldFunction, Function<String, String> fieldNameToColumnReference) Returns a CHAR_LENGTH(col) SQL expression for the given escaped column name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.module.rdbms.fieldfunctions.RDBMSFieldFunctionAdapterInterface
getParams, wrapColumnNameForOrderBy
-
Constructor Details
-
RDBMSStringLengthFunction
public RDBMSStringLengthFunction()
-
-
Method Details
-
wrapColumnName
public String wrapColumnName(String escapedColumnName, FieldFunction fieldFunction, Function<String, String> fieldNameToColumnReference) Returns a CHAR_LENGTH(col) SQL expression for the given escaped column name.- Specified by:
wrapColumnNamein interfaceRDBMSFieldFunctionAdapterInterface- Parameters:
escapedColumnName- a fully qualified and escaped SQL column name for the 'main' field that this function works with (e.g.,FieldFunction#withFieldName(String). Looks like:`my_table`.`my_field`.fieldFunction- the function with arguments, being used.fieldNameToColumnReference- resolves a QQQ field name to its fully- qualified escaped SQL column reference (e.g.,"timeZone"→`t1`.`time_zone`). Useful when the function expression needs to reference additional columns on the same row.
-