de.jaggl.sqlbuilder.columns.datetime.DateColumn Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlbuilder-core Show documentation
Show all versions of sqlbuilder-core Show documentation
A Java-Library to build SQL-Statements
package de.jaggl.sqlbuilder.columns.datetime;
import java.time.ZonedDateTime;
import java.time.temporal.Temporal;
import java.util.function.Function;
import de.jaggl.sqlbuilder.columns.Column;
import de.jaggl.sqlbuilder.columns.ColumnDefinition;
import de.jaggl.sqlbuilder.conditions.DateTimeConditions;
import de.jaggl.sqlbuilder.schema.Table;
import lombok.ToString;
/**
* @author Martin Schumacher
*
* @since 2.0.0
*/
@ToString(callSuper = true)
public class DateColumn extends Column implements DateTimeConditions
{
@Override
public Function getDateConversion()
{
return ZonedDateTime::toLocalDate;
}
public DateColumn(Table table, String name, String alias, ColumnDefinition columnDefinition)
{
super(table, name, alias, columnDefinition);
}
public DateColumn as(String alias)
{
return new DateColumn(table, name, alias, columnDefinition);
}
}