forked from go/pgm
Derived tabled func
This commit is contained in:
@@ -12,3 +12,11 @@ var (
|
||||
Comment = pgm.Table{Name: "comments", FieldCount: 5}
|
||||
Employee = pgm.Table{Name: "employees", FieldCount: 5}
|
||||
)
|
||||
|
||||
func DerivedTable(tblName string, fromQry pgm.Query) pgm.Table {
|
||||
t := pgm.Table{
|
||||
Name: tblName,
|
||||
DerivedTable: fromQry,
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user