2019-07-17 13:22:14 +02:00
|
|
|
//
|
|
|
|
|
// Code generated by go-jet DO NOT EDIT.
|
|
|
|
|
//
|
|
|
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
|
|
|
|
// and will be lost if the code is regenerated
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
package table
|
|
|
|
|
|
|
|
|
|
import (
|
2019-08-08 12:02:32 +02:00
|
|
|
"github.com/go-jet/jet/postgres"
|
2019-07-17 13:22:14 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var Actor = newActorTable()
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
type actorTable struct {
|
2019-08-08 12:02:32 +02:00
|
|
|
postgres.Table
|
2019-07-17 13:22:14 +02:00
|
|
|
|
|
|
|
|
//Columns
|
2019-08-08 12:02:32 +02:00
|
|
|
ActorID postgres.ColumnInteger
|
|
|
|
|
FirstName postgres.ColumnString
|
|
|
|
|
LastName postgres.ColumnString
|
|
|
|
|
LastUpdate postgres.ColumnTimestamp
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2019-09-26 12:31:03 +02:00
|
|
|
AllColumns postgres.ColumnList
|
|
|
|
|
MutableColumns postgres.ColumnList
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
type ActorTable struct {
|
|
|
|
|
actorTable
|
|
|
|
|
|
|
|
|
|
EXCLUDED actorTable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AS creates new ActorTable with assigned alias
|
2019-07-17 13:22:14 +02:00
|
|
|
func (a *ActorTable) AS(alias string) *ActorTable {
|
|
|
|
|
aliasTable := newActorTable()
|
|
|
|
|
aliasTable.Table.AS(alias)
|
|
|
|
|
return aliasTable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newActorTable() *ActorTable {
|
2020-05-31 10:42:55 +02:00
|
|
|
return &ActorTable{
|
|
|
|
|
actorTable: newActorTableImpl("dvds", "actor"),
|
|
|
|
|
EXCLUDED: newActorTableImpl("", "excluded"),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newActorTableImpl(schemaName, tableName string) actorTable {
|
2019-07-17 13:22:14 +02:00
|
|
|
var (
|
2019-08-08 12:02:32 +02:00
|
|
|
ActorIDColumn = postgres.IntegerColumn("actor_id")
|
|
|
|
|
FirstNameColumn = postgres.StringColumn("first_name")
|
|
|
|
|
LastNameColumn = postgres.StringColumn("last_name")
|
|
|
|
|
LastUpdateColumn = postgres.TimestampColumn("last_update")
|
2020-05-31 10:42:55 +02:00
|
|
|
allColumns = postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, LastUpdateColumn}
|
|
|
|
|
mutableColumns = postgres.ColumnList{FirstNameColumn, LastNameColumn, LastUpdateColumn}
|
2019-07-17 13:22:14 +02:00
|
|
|
)
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
return actorTable{
|
|
|
|
|
Table: postgres.NewTable(schemaName, tableName, allColumns...),
|
2019-07-17 13:22:14 +02:00
|
|
|
|
|
|
|
|
//Columns
|
|
|
|
|
ActorID: ActorIDColumn,
|
|
|
|
|
FirstName: FirstNameColumn,
|
|
|
|
|
LastName: LastNameColumn,
|
|
|
|
|
LastUpdate: LastUpdateColumn,
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
AllColumns: allColumns,
|
|
|
|
|
MutableColumns: mutableColumns,
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
}
|