[New] Constructor for time types, that accepts time.Time. (TimeT, TimezT, DateT, ...)
This commit is contained in:
parent
647ef21aaf
commit
6ee2f45548
11 changed files with 182 additions and 22 deletions
|
|
@ -8,6 +8,7 @@ type cast interface {
|
|||
jet.Cast
|
||||
|
||||
AS_DATETIME() DateTimeExpression
|
||||
AS_TIMESTAMP() TimestampExpression
|
||||
AS_SIGNED() IntegerExpression
|
||||
AS_UNSIGNED() IntegerExpression
|
||||
AS_BINARY() StringExpression
|
||||
|
|
@ -29,6 +30,10 @@ func (c *castImpl) AS_DATETIME() DateTimeExpression {
|
|||
return jet.TimestampExp(c.AS("DATETIME"))
|
||||
}
|
||||
|
||||
func (c *castImpl) AS_TIMESTAMP() TimestampExpression {
|
||||
return jet.TimestampExp(c.AS("DATETIME"))
|
||||
}
|
||||
|
||||
func (c *castImpl) AS_SIGNED() IntegerExpression {
|
||||
return jet.IntExp(c.AS("SIGNED"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue