mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
22 lines
295 B
Go
22 lines
295 B
Go
package history
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Record struct {
|
|
Query string `json:"query"`
|
|
Timestamp string `json:"timestamp"`
|
|
}
|
|
|
|
func New() []Record {
|
|
return make([]Record, 0)
|
|
}
|
|
|
|
func NewRecord(query string) Record {
|
|
return Record{
|
|
Query: query,
|
|
Timestamp: time.Now().String(),
|
|
}
|
|
}
|