Add self join support.
This commit is contained in:
parent
20c6f39665
commit
1cb997fc54
5 changed files with 89 additions and 15 deletions
|
|
@ -27,6 +27,7 @@ type Column interface {
|
|||
setTableName(table string) error
|
||||
|
||||
Eq(rhs Expression) BoolExpression
|
||||
Neq(rhs Expression) BoolExpression
|
||||
|
||||
Gte(rhs Expression) BoolExpression
|
||||
GteLiteral(rhs interface{}) BoolExpression
|
||||
|
|
@ -109,6 +110,10 @@ func (c *baseColumn) Eq(rhs Expression) BoolExpression {
|
|||
return Eq(c, rhs)
|
||||
}
|
||||
|
||||
func (c *baseColumn) Neq(rhs Expression) BoolExpression {
|
||||
return Neq(c, rhs)
|
||||
}
|
||||
|
||||
func (c *baseColumn) Gte(rhs Expression) BoolExpression {
|
||||
return Gte(c, rhs)
|
||||
}
|
||||
|
|
@ -198,7 +203,7 @@ type IntegerColumn struct {
|
|||
|
||||
// Representation of any integer column
|
||||
// This function will panic if name is not valid
|
||||
func IntColumn(name string, nullable NullableColumn) NonAliasColumn {
|
||||
func IntColumn(name string, nullable NullableColumn) *IntegerColumn {
|
||||
if !validIdentifierName(name) {
|
||||
panic("Invalid column name in int column")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue