82 lines
2.3 KiB
Go
82 lines
2.3 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 table
|
|
|
|
import (
|
|
"github.com/go-jet/jet/v2/postgres"
|
|
)
|
|
|
|
var ImageLists = newImageListsTable("haystack", "image_lists", "")
|
|
|
|
type imageListsTable struct {
|
|
postgres.Table
|
|
|
|
// Columns
|
|
ID postgres.ColumnString
|
|
ImageID postgres.ColumnString
|
|
ListID postgres.ColumnString
|
|
|
|
AllColumns postgres.ColumnList
|
|
MutableColumns postgres.ColumnList
|
|
}
|
|
|
|
type ImageListsTable struct {
|
|
imageListsTable
|
|
|
|
EXCLUDED imageListsTable
|
|
}
|
|
|
|
// AS creates new ImageListsTable with assigned alias
|
|
func (a ImageListsTable) AS(alias string) *ImageListsTable {
|
|
return newImageListsTable(a.SchemaName(), a.TableName(), alias)
|
|
}
|
|
|
|
// Schema creates new ImageListsTable with assigned schema name
|
|
func (a ImageListsTable) FromSchema(schemaName string) *ImageListsTable {
|
|
return newImageListsTable(schemaName, a.TableName(), a.Alias())
|
|
}
|
|
|
|
// WithPrefix creates new ImageListsTable with assigned table prefix
|
|
func (a ImageListsTable) WithPrefix(prefix string) *ImageListsTable {
|
|
return newImageListsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
|
}
|
|
|
|
// WithSuffix creates new ImageListsTable with assigned table suffix
|
|
func (a ImageListsTable) WithSuffix(suffix string) *ImageListsTable {
|
|
return newImageListsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
|
}
|
|
|
|
func newImageListsTable(schemaName, tableName, alias string) *ImageListsTable {
|
|
return &ImageListsTable{
|
|
imageListsTable: newImageListsTableImpl(schemaName, tableName, alias),
|
|
EXCLUDED: newImageListsTableImpl("", "excluded", ""),
|
|
}
|
|
}
|
|
|
|
func newImageListsTableImpl(schemaName, tableName, alias string) imageListsTable {
|
|
var (
|
|
IDColumn = postgres.StringColumn("id")
|
|
ImageIDColumn = postgres.StringColumn("image_id")
|
|
ListIDColumn = postgres.StringColumn("list_id")
|
|
allColumns = postgres.ColumnList{IDColumn, ImageIDColumn, ListIDColumn}
|
|
mutableColumns = postgres.ColumnList{ImageIDColumn, ListIDColumn}
|
|
)
|
|
|
|
return imageListsTable{
|
|
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
|
|
|
//Columns
|
|
ID: IDColumn,
|
|
ImageID: ImageIDColumn,
|
|
ListID: ListIDColumn,
|
|
|
|
AllColumns: allColumns,
|
|
MutableColumns: mutableColumns,
|
|
}
|
|
}
|