94 lines
3.0 KiB
Go
94 lines
3.0 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 ProcessingLists = newProcessingListsTable("haystack", "processing_lists", "")
|
|
|
|
type processingListsTable struct {
|
|
postgres.Table
|
|
|
|
// Columns
|
|
ID postgres.ColumnString
|
|
UserID postgres.ColumnString
|
|
Title postgres.ColumnString
|
|
Fields postgres.ColumnString
|
|
Status postgres.ColumnString
|
|
CreatedAt postgres.ColumnTimestampz
|
|
|
|
AllColumns postgres.ColumnList
|
|
MutableColumns postgres.ColumnList
|
|
DefaultColumns postgres.ColumnList
|
|
}
|
|
|
|
type ProcessingListsTable struct {
|
|
processingListsTable
|
|
|
|
EXCLUDED processingListsTable
|
|
}
|
|
|
|
// AS creates new ProcessingListsTable with assigned alias
|
|
func (a ProcessingListsTable) AS(alias string) *ProcessingListsTable {
|
|
return newProcessingListsTable(a.SchemaName(), a.TableName(), alias)
|
|
}
|
|
|
|
// Schema creates new ProcessingListsTable with assigned schema name
|
|
func (a ProcessingListsTable) FromSchema(schemaName string) *ProcessingListsTable {
|
|
return newProcessingListsTable(schemaName, a.TableName(), a.Alias())
|
|
}
|
|
|
|
// WithPrefix creates new ProcessingListsTable with assigned table prefix
|
|
func (a ProcessingListsTable) WithPrefix(prefix string) *ProcessingListsTable {
|
|
return newProcessingListsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
|
}
|
|
|
|
// WithSuffix creates new ProcessingListsTable with assigned table suffix
|
|
func (a ProcessingListsTable) WithSuffix(suffix string) *ProcessingListsTable {
|
|
return newProcessingListsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
|
}
|
|
|
|
func newProcessingListsTable(schemaName, tableName, alias string) *ProcessingListsTable {
|
|
return &ProcessingListsTable{
|
|
processingListsTable: newProcessingListsTableImpl(schemaName, tableName, alias),
|
|
EXCLUDED: newProcessingListsTableImpl("", "excluded", ""),
|
|
}
|
|
}
|
|
|
|
func newProcessingListsTableImpl(schemaName, tableName, alias string) processingListsTable {
|
|
var (
|
|
IDColumn = postgres.StringColumn("id")
|
|
UserIDColumn = postgres.StringColumn("user_id")
|
|
TitleColumn = postgres.StringColumn("title")
|
|
FieldsColumn = postgres.StringColumn("fields")
|
|
StatusColumn = postgres.StringColumn("status")
|
|
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
|
allColumns = postgres.ColumnList{IDColumn, UserIDColumn, TitleColumn, FieldsColumn, StatusColumn, CreatedAtColumn}
|
|
mutableColumns = postgres.ColumnList{UserIDColumn, TitleColumn, FieldsColumn, StatusColumn, CreatedAtColumn}
|
|
defaultColumns = postgres.ColumnList{IDColumn, StatusColumn, CreatedAtColumn}
|
|
)
|
|
|
|
return processingListsTable{
|
|
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
|
|
|
//Columns
|
|
ID: IDColumn,
|
|
UserID: UserIDColumn,
|
|
Title: TitleColumn,
|
|
Fields: FieldsColumn,
|
|
Status: StatusColumn,
|
|
CreatedAt: CreatedAtColumn,
|
|
|
|
AllColumns: allColumns,
|
|
MutableColumns: mutableColumns,
|
|
DefaultColumns: defaultColumns,
|
|
}
|
|
}
|