Documentation ¶
Index ¶
- type Column
- type Select
- func (q *Select) AddAliasedColumn(expr, alias string) *Column
- func (q *Select) AddColumn(col *Column) *Column
- func (q *Select) AddColumnExpr(expr string) *Column
- func (q *Select) AddJoinTable(table *Table, joinExpr string, joinType string) *TableExpr
- func (q *Select) AddNamedAliasedTable(name, alias string) *TableExpr
- func (q *Select) AddNamedTable(name string) *TableExpr
- func (q *Select) AddTable(table *Table) *TableExpr
- func (q *Select) AddTableExpr(expr *TableExpr) *TableExpr
- func (q *Select) ColumnSQL() string
- func (q *Select) FromClauses() string
- func (q *Select) SQL() string
- type Table
- type TableExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Select ¶
A Select represents a SQL select statement with a list of columns to select and a list of tables being selected from.
func (*Select) AddAliasedColumn ¶
AddAliasedColumn adds expr as a selected column with alias.
func (*Select) AddColumnExpr ¶
AddColumnExpr adds expr as a selected column.
func (*Select) AddJoinTable ¶
AddJoinTable adds table as a join table with joinExpr as the join condition and joinType specifying the type of join.
func (*Select) AddNamedAliasedTable ¶
AddNamedAliasedTable adds name as a selected table with a table alias.
func (*Select) AddNamedTable ¶
AddNamedTable adds name as a selected table.
func (*Select) AddTableExpr ¶
AddTableExpr adds expr as a joined table expression.
func (*Select) FromClauses ¶
FromClauses gets the SQL FROM clauses for this query.
type Table ¶
A Table is a SQL query fragment referencing a single table.
func (*Table) EffectiveAlias ¶
EffectiveAlias gets the alias for this table in the broader query. If no explicit alias has been specified, returns the table name itself.
func (*Table) QualifiedName ¶
QualifiedName qualifies the column name with the table's query alias.
func (*Table) SimpleTable ¶
SimpleTable returns true if there are no explicit columns selected from this table, viz. a simple reference to the underlying table.