NAME
Kernel::System::DynamicField::Driver::Role::HasValueType::DateTime – Role for dynamic field drivers, indicate that the driver handles and stores the values in the date-time
column.
PUBLIC INTERFACE
Provides and overrides base methods to deal with date-time values.
SearchSQLGet()
Returns the SQL WHERE part that needs to be used to search in a particular dynamic field. The table must already be joined.
my $SQL = $DynamicField->SearchSQLGet(
TableAlias => $TableAlias, # the alias of the already joined dynamic_field_value table to use
SearchTerm => $SearchTerm, # What to look for. Placeholders in LIKE searches must be passed as %.
Operator => $Operator, # One of [Equals, Like, GreaterThan, GreaterThanEquals, SmallerThan, SmallerThanEquals]
);
RandomValueSet()
Inserts a random value.
my $ValueObject = $DynamicField->RandomValueSet(
ObjectID => '...',
);
Returns
C<undef> - in case any error occurs
1 - in case of success
PRIVATE INTERFACE
_ValueColumn()
Returns the value column/parameter of the driver.
_ValueValidatePrimitive()
Performs the basic validation according to the value type.
_CreateValue()
Overrides the base '_CreateValue' to handle the date-time values properly.
_IsDateTime()
Indicates if the driver handles date-time values or only dates.
_ConvertDate2DateTime()
Converts the provided value from a date string to a date-time string, with the time as '00:00:00'.