java.lang.Object
org.evomaster.client.java.sql.heuristic.function.SqlFunction
org.evomaster.client.java.sql.heuristic.function.DateFunction

public class DateFunction extends SqlFunction
Represents the SQL DATE() function, which converts a given value into a SQL Date object. The DATE() function accepts a single argument and attempts to convert it into a SQL Date. It supports the following types of inputs: - Date: Returns the argument as it is since it is already a valid SQL Date. - Timestamp: Converts the timestamp to a date by extracting the date part. - Date: Converts the date into a SQL Date. - String: Attempts to parse the string using known SQL date/time formats. Returns a SQL Date if parsing succeeds. When the input value is null, the function returns null, maintaining SQL semantics. If the input type is unsupported or the string cannot be parsed into a valid date, an IllegalArgumentException is thrown.
  • Constructor Details

    • DateFunction

      public DateFunction()
  • Method Details