jet/examples/quick-start/.gen/jetdb/dvds/view/actor_info.go
Eli Ribble 41fe97d336
Fix the imports I botched really badly
Apparently I don't understand how go modules work.
2026-05-14 20:56:20 +00:00

87 lines
2.6 KiB
Go

//
// 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 view
import (
"source.gleipnir.technology/Gleipnir/jet/v2/postgres"
)
var ActorInfo = newActorInfoTable("dvds", "actor_info", "")
type actorInfoTable struct {
postgres.Table
// Columns
ActorID postgres.ColumnInteger
FirstName postgres.ColumnString
LastName postgres.ColumnString
FilmInfo postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type ActorInfoTable struct {
actorInfoTable
EXCLUDED actorInfoTable
}
// AS creates new ActorInfoTable with assigned alias
func (a ActorInfoTable) AS(alias string) *ActorInfoTable {
return newActorInfoTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new ActorInfoTable with assigned schema name
func (a ActorInfoTable) FromSchema(schemaName string) *ActorInfoTable {
return newActorInfoTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new ActorInfoTable with assigned table prefix
func (a ActorInfoTable) WithPrefix(prefix string) *ActorInfoTable {
return newActorInfoTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new ActorInfoTable with assigned table suffix
func (a ActorInfoTable) WithSuffix(suffix string) *ActorInfoTable {
return newActorInfoTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newActorInfoTable(schemaName, tableName, alias string) *ActorInfoTable {
return &ActorInfoTable{
actorInfoTable: newActorInfoTableImpl(schemaName, tableName, alias),
EXCLUDED: newActorInfoTableImpl("", "excluded", ""),
}
}
func newActorInfoTableImpl(schemaName, tableName, alias string) actorInfoTable {
var (
ActorIDColumn = postgres.IntegerColumn("actor_id")
FirstNameColumn = postgres.StringColumn("first_name")
LastNameColumn = postgres.StringColumn("last_name")
FilmInfoColumn = postgres.StringColumn("film_info")
allColumns = postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn}
mutableColumns = postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn}
defaultColumns = postgres.ColumnList{}
)
return actorInfoTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
ActorID: ActorIDColumn,
FirstName: FirstNameColumn,
LastName: LastNameColumn,
FilmInfo: FilmInfoColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}