[Breakable] ColumnList is reverted to be a slice.
ColumnList(...) -> ColumnList{...}
IColumnList is removed.
This commit is contained in:
parent
4f86a77b2d
commit
799737d602
30 changed files with 217 additions and 105 deletions
59
examples/quick-start/.gen/jetdb/dvds/view/actor_info.go
Normal file
59
examples/quick-start/.gen/jetdb/dvds/view/actor_info.go
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
//
|
||||
// Code generated by go-jet DO NOT EDIT.
|
||||
// Generated at Thursday, 26-Sep-19 12:02:13 CEST
|
||||
//
|
||||
// WARNING: Changes to this file may cause incorrect behavior
|
||||
// and will be lost if the code is regenerated
|
||||
//
|
||||
|
||||
package view
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/postgres"
|
||||
)
|
||||
|
||||
var ActorInfo = newActorInfoTable()
|
||||
|
||||
type ActorInfoTable struct {
|
||||
postgres.Table
|
||||
|
||||
//Columns
|
||||
ActorID postgres.ColumnInteger
|
||||
FirstName postgres.ColumnString
|
||||
LastName postgres.ColumnString
|
||||
FilmInfo postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
// creates new ActorInfoTable with assigned alias
|
||||
func (a *ActorInfoTable) AS(alias string) *ActorInfoTable {
|
||||
aliasTable := newActorInfoTable()
|
||||
|
||||
aliasTable.Table.AS(alias)
|
||||
|
||||
return aliasTable
|
||||
}
|
||||
|
||||
func newActorInfoTable() *ActorInfoTable {
|
||||
var (
|
||||
ActorIDColumn = postgres.IntegerColumn("actor_id")
|
||||
FirstNameColumn = postgres.StringColumn("first_name")
|
||||
LastNameColumn = postgres.StringColumn("last_name")
|
||||
FilmInfoColumn = postgres.StringColumn("film_info")
|
||||
)
|
||||
|
||||
return &ActorInfoTable{
|
||||
Table: postgres.NewTable("dvds", "actor_info", ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn),
|
||||
|
||||
//Columns
|
||||
ActorID: ActorIDColumn,
|
||||
FirstName: FirstNameColumn,
|
||||
LastName: LastNameColumn,
|
||||
FilmInfo: FilmInfoColumn,
|
||||
|
||||
AllColumns: postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn},
|
||||
MutableColumns: postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn},
|
||||
}
|
||||
}
|
||||
74
examples/quick-start/.gen/jetdb/dvds/view/customer_list.go
Normal file
74
examples/quick-start/.gen/jetdb/dvds/view/customer_list.go
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
//
|
||||
// Code generated by go-jet DO NOT EDIT.
|
||||
// Generated at Thursday, 26-Sep-19 12:02:13 CEST
|
||||
//
|
||||
// WARNING: Changes to this file may cause incorrect behavior
|
||||
// and will be lost if the code is regenerated
|
||||
//
|
||||
|
||||
package view
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/postgres"
|
||||
)
|
||||
|
||||
var CustomerList = newCustomerListTable()
|
||||
|
||||
type CustomerListTable struct {
|
||||
postgres.Table
|
||||
|
||||
//Columns
|
||||
ID postgres.ColumnInteger
|
||||
Name postgres.ColumnString
|
||||
Address postgres.ColumnString
|
||||
ZipCode postgres.ColumnString
|
||||
Phone postgres.ColumnString
|
||||
City postgres.ColumnString
|
||||
Country postgres.ColumnString
|
||||
Notes postgres.ColumnString
|
||||
Sid postgres.ColumnInteger
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
// creates new CustomerListTable with assigned alias
|
||||
func (a *CustomerListTable) AS(alias string) *CustomerListTable {
|
||||
aliasTable := newCustomerListTable()
|
||||
|
||||
aliasTable.Table.AS(alias)
|
||||
|
||||
return aliasTable
|
||||
}
|
||||
|
||||
func newCustomerListTable() *CustomerListTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
AddressColumn = postgres.StringColumn("address")
|
||||
ZipCodeColumn = postgres.StringColumn("zip code")
|
||||
PhoneColumn = postgres.StringColumn("phone")
|
||||
CityColumn = postgres.StringColumn("city")
|
||||
CountryColumn = postgres.StringColumn("country")
|
||||
NotesColumn = postgres.StringColumn("notes")
|
||||
SidColumn = postgres.IntegerColumn("sid")
|
||||
)
|
||||
|
||||
return &CustomerListTable{
|
||||
Table: postgres.NewTable("dvds", "customer_list", IDColumn, NameColumn, AddressColumn, ZipCodeColumn, PhoneColumn, CityColumn, CountryColumn, NotesColumn, SidColumn),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
Name: NameColumn,
|
||||
Address: AddressColumn,
|
||||
ZipCode: ZipCodeColumn,
|
||||
Phone: PhoneColumn,
|
||||
City: CityColumn,
|
||||
Country: CountryColumn,
|
||||
Notes: NotesColumn,
|
||||
Sid: SidColumn,
|
||||
|
||||
AllColumns: postgres.ColumnList{IDColumn, NameColumn, AddressColumn, ZipCodeColumn, PhoneColumn, CityColumn, CountryColumn, NotesColumn, SidColumn},
|
||||
MutableColumns: postgres.ColumnList{IDColumn, NameColumn, AddressColumn, ZipCodeColumn, PhoneColumn, CityColumn, CountryColumn, NotesColumn, SidColumn},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue