mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Implemented per database provider DATE INTERVAL queries
This commit is contained in:
parent
97d36fa2c8
commit
075060d11c
4 changed files with 22 additions and 0 deletions
|
@ -263,6 +263,12 @@ func (p PostgreSQLProvider) QueryTableList() string {
|
|||
WHERE table_type='BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') AND table_catalog='%s'`, p.DatabaseName())
|
||||
}
|
||||
|
||||
// QueryDateInterval returns provider specific interval style
|
||||
// date SQL.
|
||||
func (p PostgreSQLProvider) QueryDateInterval(days int64) string {
|
||||
return fmt.Sprintf("DATE(NOW()) - INTERVAL '%d day'", days)
|
||||
}
|
||||
|
||||
// JSONEmpty returns empty SQL JSON object.
|
||||
// Typically used as 2nd parameter to COALESCE().
|
||||
func (p PostgreSQLProvider) JSONEmpty() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue