Documentation
¶
Index ¶
- func PostgresSQLFormat(query string) string
- type DatabaseQuery
- func (q *DatabaseQuery) Columns(columns ...string)
- func (q *DatabaseQuery) Distinct()
- func (q *DatabaseQuery) From(tables ...string) error
- func (q *DatabaseQuery) GroupBys(groupbys ...string)
- func (q *DatabaseQuery) Having(query string, args ...interface{})
- func (q *DatabaseQuery) Limit(limit uint64)
- func (q *DatabaseQuery) Offset(offset uint64)
- func (q *DatabaseQuery) OrderBys(orderbys ...string)
- func (q *DatabaseQuery) Set(query string, args ...interface{})
- func (q *DatabaseQuery) Tables(tables ...string) error
- func (q *DatabaseQuery) ToSQL() (string, []interface{}, error)
- func (q *DatabaseQuery) Values(args []interface{}) error
- func (q *DatabaseQuery) Where(query string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostgresSQLFormat ¶
Types ¶
type DatabaseQuery ¶
type DatabaseQuery struct {
// contains filtered or unexported fields
}
func (*DatabaseQuery) Columns ¶
func (q *DatabaseQuery) Columns(columns ...string)
Columns add columns
func (*DatabaseQuery) From ¶
func (q *DatabaseQuery) From(tables ...string) error
From "... from ..."
func (*DatabaseQuery) GroupBys ¶
func (q *DatabaseQuery) GroupBys(groupbys ...string)
GroupBys add "group by ..."
func (*DatabaseQuery) Having ¶
func (q *DatabaseQuery) Having(query string, args ...interface{})
Having add "having ..."
func (*DatabaseQuery) Offset ¶
func (q *DatabaseQuery) Offset(offset uint64)
Offset add "offset ..."
func (*DatabaseQuery) OrderBys ¶
func (q *DatabaseQuery) OrderBys(orderbys ...string)
OrderBys add "ORDER BY"
func (*DatabaseQuery) Set ¶
func (q *DatabaseQuery) Set(query string, args ...interface{})
Set update ... "set ..."
func (*DatabaseQuery) Tables ¶
func (q *DatabaseQuery) Tables(tables ...string) error
Tables add tables
func (*DatabaseQuery) ToSQL ¶
func (q *DatabaseQuery) ToSQL() (string, []interface{}, error)
ToSQL generate sql string
func (*DatabaseQuery) Values ¶
func (q *DatabaseQuery) Values(args []interface{}) error
Values insert into ... "values ..."
func (*DatabaseQuery) Where ¶
func (q *DatabaseQuery) Where(query string, args ...interface{})
Where "where ..."
Click to show internal directories.
Click to hide internal directories.