127 lines
4.6 KiB
Go
127 lines
4.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 table
|
|
|
|
import (
|
|
"github.com/go-jet/jet/v2/postgres"
|
|
)
|
|
|
|
var RiverJob = newRiverJobTable("public", "river_job", "")
|
|
|
|
type riverJobTable struct {
|
|
postgres.Table
|
|
|
|
// Columns
|
|
ID postgres.ColumnInteger
|
|
State postgres.ColumnString
|
|
Attempt postgres.ColumnInteger
|
|
MaxAttempts postgres.ColumnInteger
|
|
AttemptedAt postgres.ColumnTimestampz
|
|
CreatedAt postgres.ColumnTimestampz
|
|
FinalizedAt postgres.ColumnTimestampz
|
|
ScheduledAt postgres.ColumnTimestampz
|
|
Priority postgres.ColumnInteger
|
|
Args postgres.ColumnString
|
|
AttemptedBy postgres.ColumnString
|
|
Errors postgres.ColumnString
|
|
Kind postgres.ColumnString
|
|
Metadata postgres.ColumnString
|
|
Queue postgres.ColumnString
|
|
Tags postgres.ColumnString
|
|
UniqueKey postgres.ColumnString
|
|
UniqueStates postgres.ColumnString
|
|
|
|
AllColumns postgres.ColumnList
|
|
MutableColumns postgres.ColumnList
|
|
}
|
|
|
|
type RiverJobTable struct {
|
|
riverJobTable
|
|
|
|
EXCLUDED riverJobTable
|
|
}
|
|
|
|
// AS creates new RiverJobTable with assigned alias
|
|
func (a RiverJobTable) AS(alias string) *RiverJobTable {
|
|
return newRiverJobTable(a.SchemaName(), a.TableName(), alias)
|
|
}
|
|
|
|
// Schema creates new RiverJobTable with assigned schema name
|
|
func (a RiverJobTable) FromSchema(schemaName string) *RiverJobTable {
|
|
return newRiverJobTable(schemaName, a.TableName(), a.Alias())
|
|
}
|
|
|
|
// WithPrefix creates new RiverJobTable with assigned table prefix
|
|
func (a RiverJobTable) WithPrefix(prefix string) *RiverJobTable {
|
|
return newRiverJobTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
|
}
|
|
|
|
// WithSuffix creates new RiverJobTable with assigned table suffix
|
|
func (a RiverJobTable) WithSuffix(suffix string) *RiverJobTable {
|
|
return newRiverJobTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
|
}
|
|
|
|
func newRiverJobTable(schemaName, tableName, alias string) *RiverJobTable {
|
|
return &RiverJobTable{
|
|
riverJobTable: newRiverJobTableImpl(schemaName, tableName, alias),
|
|
EXCLUDED: newRiverJobTableImpl("", "excluded", ""),
|
|
}
|
|
}
|
|
|
|
func newRiverJobTableImpl(schemaName, tableName, alias string) riverJobTable {
|
|
var (
|
|
IDColumn = postgres.IntegerColumn("id")
|
|
StateColumn = postgres.StringColumn("state")
|
|
AttemptColumn = postgres.IntegerColumn("attempt")
|
|
MaxAttemptsColumn = postgres.IntegerColumn("max_attempts")
|
|
AttemptedAtColumn = postgres.TimestampzColumn("attempted_at")
|
|
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
|
FinalizedAtColumn = postgres.TimestampzColumn("finalized_at")
|
|
ScheduledAtColumn = postgres.TimestampzColumn("scheduled_at")
|
|
PriorityColumn = postgres.IntegerColumn("priority")
|
|
ArgsColumn = postgres.StringColumn("args")
|
|
AttemptedByColumn = postgres.StringColumn("attempted_by")
|
|
ErrorsColumn = postgres.StringColumn("errors")
|
|
KindColumn = postgres.StringColumn("kind")
|
|
MetadataColumn = postgres.StringColumn("metadata")
|
|
QueueColumn = postgres.StringColumn("queue")
|
|
TagsColumn = postgres.StringColumn("tags")
|
|
UniqueKeyColumn = postgres.StringColumn("unique_key")
|
|
UniqueStatesColumn = postgres.StringColumn("unique_states")
|
|
allColumns = postgres.ColumnList{IDColumn, StateColumn, AttemptColumn, MaxAttemptsColumn, AttemptedAtColumn, CreatedAtColumn, FinalizedAtColumn, ScheduledAtColumn, PriorityColumn, ArgsColumn, AttemptedByColumn, ErrorsColumn, KindColumn, MetadataColumn, QueueColumn, TagsColumn, UniqueKeyColumn, UniqueStatesColumn}
|
|
mutableColumns = postgres.ColumnList{StateColumn, AttemptColumn, MaxAttemptsColumn, AttemptedAtColumn, CreatedAtColumn, FinalizedAtColumn, ScheduledAtColumn, PriorityColumn, ArgsColumn, AttemptedByColumn, ErrorsColumn, KindColumn, MetadataColumn, QueueColumn, TagsColumn, UniqueKeyColumn, UniqueStatesColumn}
|
|
)
|
|
|
|
return riverJobTable{
|
|
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
|
|
|
//Columns
|
|
ID: IDColumn,
|
|
State: StateColumn,
|
|
Attempt: AttemptColumn,
|
|
MaxAttempts: MaxAttemptsColumn,
|
|
AttemptedAt: AttemptedAtColumn,
|
|
CreatedAt: CreatedAtColumn,
|
|
FinalizedAt: FinalizedAtColumn,
|
|
ScheduledAt: ScheduledAtColumn,
|
|
Priority: PriorityColumn,
|
|
Args: ArgsColumn,
|
|
AttemptedBy: AttemptedByColumn,
|
|
Errors: ErrorsColumn,
|
|
Kind: KindColumn,
|
|
Metadata: MetadataColumn,
|
|
Queue: QueueColumn,
|
|
Tags: TagsColumn,
|
|
UniqueKey: UniqueKeyColumn,
|
|
UniqueStates: UniqueStatesColumn,
|
|
|
|
AllColumns: allColumns,
|
|
MutableColumns: mutableColumns,
|
|
}
|
|
}
|