Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(sw io.StringWriter, joinType JoinType, from string, match JoinMatcher) error
Join writes a JOIN clause to a strings.Builder.
Example:
LEFT JOIN table ON table.field = other_table.field AND table.field2 = other_table.field2 LEFT JOIN table USING (field, field2)
Types ¶
type Clause ¶
type Clause struct {
// contains filtered or unexported fields
}
Clause represents a JOIN clause.
func (*Clause) Type ¶
func (j *Clause) Type() clauses.ClauseType
type JoinMatcher ¶
type JoinMatcher interface { expressions.Expression // contains filtered or unexported methods }
JoinMatcher is a join clause.
type JoinOn ¶
type JoinOn struct {
Predicates []predicates.Predicate
}
JoinOn is a join clause that uses a list of predicates to match.
Example:
LEFT JOIN table ON table.field = other_table.field AND table.field2 = other_table.field2
type JoinUsing ¶
type JoinUsing struct {
Uses []string
}
JoinUsing is a join clause that uses a list of columns to match.
Example:
LEFT JOIN table USING (field, field2)
type Options ¶
type Options struct { Type JoinType From string Match JoinMatcher // JoinOn or JoinUsing }
Click to show internal directories.
Click to hide internal directories.