CurrentTimestamp returns the current timestamp
()
| 24 | |
| 25 | // CurrentTimestamp returns the current timestamp |
| 26 | func (e *SQLEngine) CurrentTimestamp() (*schema_pb.Value, error) { |
| 27 | now := time.Now() |
| 28 | |
| 29 | // Return as TimestampValue with microseconds |
| 30 | timestampMicros := now.UnixMicro() |
| 31 | |
| 32 | return &schema_pb.Value{ |
| 33 | Kind: &schema_pb.Value_TimestampValue{ |
| 34 | TimestampValue: &schema_pb.TimestampValue{ |
| 35 | TimestampMicros: timestampMicros, |
| 36 | }, |
| 37 | }, |
| 38 | }, nil |
| 39 | } |
| 40 | |
| 41 | // CurrentTime returns the current time as a string in HH:MM:SS format |
| 42 | func (e *SQLEngine) CurrentTime() (*schema_pb.Value, error) { |