mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 20:13:06 +03:00
22 lines
341 B
Go
22 lines
341 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type HistoryRecord struct {
|
|
Query string `json:"query"`
|
|
Timestamp string `json:"timestamp"`
|
|
}
|
|
|
|
func NewHistory() []HistoryRecord {
|
|
return make([]HistoryRecord, 0)
|
|
}
|
|
|
|
func NewHistoryRecord(query string) HistoryRecord {
|
|
return HistoryRecord{
|
|
Query: query,
|
|
Timestamp: time.Now().String(),
|
|
}
|
|
}
|