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 (
|
2026-05-14 16:26:47 +00:00
|
|
|
"source.gleipnir.technology/Gleipnir/jet/postgres"
|
2019-07-17 13:22:14 +02:00
|
|
|
)
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
var Film = newFilmTable("dvds", "film", "")
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
type filmTable struct {
|
2019-08-08 12:02:32 +02:00
|
|
|
postgres.Table
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2025-10-16 15:09:07 +02:00
|
|
|
// Columns
|
2019-08-08 12:02:32 +02:00
|
|
|
FilmID postgres.ColumnInteger
|
|
|
|
|
Title postgres.ColumnString
|
|
|
|
|
Description postgres.ColumnString
|
|
|
|
|
ReleaseYear postgres.ColumnInteger
|
|
|
|
|
LanguageID postgres.ColumnInteger
|
|
|
|
|
RentalDuration postgres.ColumnInteger
|
|
|
|
|
RentalRate postgres.ColumnFloat
|
|
|
|
|
Length postgres.ColumnInteger
|
|
|
|
|
ReplacementCost postgres.ColumnFloat
|
|
|
|
|
Rating postgres.ColumnString
|
|
|
|
|
LastUpdate postgres.ColumnTimestamp
|
2025-10-16 15:09:07 +02:00
|
|
|
SpecialFeatures postgres.ColumnStringArray
|
2019-08-08 12:02:32 +02:00
|
|
|
Fulltext postgres.ColumnString
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2019-09-26 12:31:03 +02:00
|
|
|
AllColumns postgres.ColumnList
|
|
|
|
|
MutableColumns postgres.ColumnList
|
2025-10-16 15:09:07 +02:00
|
|
|
DefaultColumns postgres.ColumnList
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
type FilmTable struct {
|
|
|
|
|
filmTable
|
|
|
|
|
|
|
|
|
|
EXCLUDED filmTable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AS creates new FilmTable with assigned alias
|
2021-03-21 17:18:43 +01:00
|
|
|
func (a FilmTable) AS(alias string) *FilmTable {
|
|
|
|
|
return newFilmTable(a.SchemaName(), a.TableName(), alias)
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
// Schema creates new FilmTable with assigned schema name
|
|
|
|
|
func (a FilmTable) FromSchema(schemaName string) *FilmTable {
|
|
|
|
|
return newFilmTable(schemaName, a.TableName(), a.Alias())
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-16 22:47:34 +08:00
|
|
|
// WithPrefix creates new FilmTable with assigned table prefix
|
|
|
|
|
func (a FilmTable) WithPrefix(prefix string) *FilmTable {
|
|
|
|
|
return newFilmTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WithSuffix creates new FilmTable with assigned table suffix
|
|
|
|
|
func (a FilmTable) WithSuffix(suffix string) *FilmTable {
|
|
|
|
|
return newFilmTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
func newFilmTable(schemaName, tableName, alias string) *FilmTable {
|
2020-05-31 10:42:55 +02:00
|
|
|
return &FilmTable{
|
2021-03-21 17:18:43 +01:00
|
|
|
filmTable: newFilmTableImpl(schemaName, tableName, alias),
|
|
|
|
|
EXCLUDED: newFilmTableImpl("", "excluded", ""),
|
2020-05-31 10:42:55 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
func newFilmTableImpl(schemaName, tableName, alias string) filmTable {
|
2019-07-17 13:22:14 +02:00
|
|
|
var (
|
2019-08-08 12:02:32 +02:00
|
|
|
FilmIDColumn = postgres.IntegerColumn("film_id")
|
|
|
|
|
TitleColumn = postgres.StringColumn("title")
|
|
|
|
|
DescriptionColumn = postgres.StringColumn("description")
|
|
|
|
|
ReleaseYearColumn = postgres.IntegerColumn("release_year")
|
|
|
|
|
LanguageIDColumn = postgres.IntegerColumn("language_id")
|
|
|
|
|
RentalDurationColumn = postgres.IntegerColumn("rental_duration")
|
|
|
|
|
RentalRateColumn = postgres.FloatColumn("rental_rate")
|
|
|
|
|
LengthColumn = postgres.IntegerColumn("length")
|
|
|
|
|
ReplacementCostColumn = postgres.FloatColumn("replacement_cost")
|
|
|
|
|
RatingColumn = postgres.StringColumn("rating")
|
|
|
|
|
LastUpdateColumn = postgres.TimestampColumn("last_update")
|
2025-10-16 15:09:07 +02:00
|
|
|
SpecialFeaturesColumn = postgres.StringArrayColumn("special_features")
|
2019-08-08 12:02:32 +02:00
|
|
|
FulltextColumn = postgres.StringColumn("fulltext")
|
2020-05-31 10:42:55 +02:00
|
|
|
allColumns = postgres.ColumnList{FilmIDColumn, TitleColumn, DescriptionColumn, ReleaseYearColumn, LanguageIDColumn, RentalDurationColumn, RentalRateColumn, LengthColumn, ReplacementCostColumn, RatingColumn, LastUpdateColumn, SpecialFeaturesColumn, FulltextColumn}
|
|
|
|
|
mutableColumns = postgres.ColumnList{TitleColumn, DescriptionColumn, ReleaseYearColumn, LanguageIDColumn, RentalDurationColumn, RentalRateColumn, LengthColumn, ReplacementCostColumn, RatingColumn, LastUpdateColumn, SpecialFeaturesColumn, FulltextColumn}
|
2025-10-16 15:09:07 +02:00
|
|
|
defaultColumns = postgres.ColumnList{FilmIDColumn, RentalDurationColumn, RentalRateColumn, ReplacementCostColumn, RatingColumn, LastUpdateColumn}
|
2019-07-17 13:22:14 +02:00
|
|
|
)
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
return filmTable{
|
2021-03-21 17:18:43 +01:00
|
|
|
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
2019-07-17 13:22:14 +02:00
|
|
|
|
|
|
|
|
//Columns
|
|
|
|
|
FilmID: FilmIDColumn,
|
|
|
|
|
Title: TitleColumn,
|
|
|
|
|
Description: DescriptionColumn,
|
|
|
|
|
ReleaseYear: ReleaseYearColumn,
|
|
|
|
|
LanguageID: LanguageIDColumn,
|
|
|
|
|
RentalDuration: RentalDurationColumn,
|
|
|
|
|
RentalRate: RentalRateColumn,
|
|
|
|
|
Length: LengthColumn,
|
|
|
|
|
ReplacementCost: ReplacementCostColumn,
|
|
|
|
|
Rating: RatingColumn,
|
|
|
|
|
LastUpdate: LastUpdateColumn,
|
|
|
|
|
SpecialFeatures: SpecialFeaturesColumn,
|
|
|
|
|
Fulltext: FulltextColumn,
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
AllColumns: allColumns,
|
|
|
|
|
MutableColumns: mutableColumns,
|
2025-10-16 15:09:07 +02:00
|
|
|
DefaultColumns: defaultColumns,
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
}
|