feat: init repo
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// 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 RiverClient = newRiverClientTable("public", "river_client", "")
|
||||
|
||||
type riverClientTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnString
|
||||
CreatedAt postgres.ColumnTimestampz
|
||||
Metadata postgres.ColumnString
|
||||
PausedAt postgres.ColumnTimestampz
|
||||
UpdatedAt postgres.ColumnTimestampz
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type RiverClientTable struct {
|
||||
riverClientTable
|
||||
|
||||
EXCLUDED riverClientTable
|
||||
}
|
||||
|
||||
// AS creates new RiverClientTable with assigned alias
|
||||
func (a RiverClientTable) AS(alias string) *RiverClientTable {
|
||||
return newRiverClientTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new RiverClientTable with assigned schema name
|
||||
func (a RiverClientTable) FromSchema(schemaName string) *RiverClientTable {
|
||||
return newRiverClientTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new RiverClientTable with assigned table prefix
|
||||
func (a RiverClientTable) WithPrefix(prefix string) *RiverClientTable {
|
||||
return newRiverClientTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new RiverClientTable with assigned table suffix
|
||||
func (a RiverClientTable) WithSuffix(suffix string) *RiverClientTable {
|
||||
return newRiverClientTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newRiverClientTable(schemaName, tableName, alias string) *RiverClientTable {
|
||||
return &RiverClientTable{
|
||||
riverClientTable: newRiverClientTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newRiverClientTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newRiverClientTableImpl(schemaName, tableName, alias string) riverClientTable {
|
||||
var (
|
||||
IDColumn = postgres.StringColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
||||
MetadataColumn = postgres.StringColumn("metadata")
|
||||
PausedAtColumn = postgres.TimestampzColumn("paused_at")
|
||||
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, MetadataColumn, PausedAtColumn, UpdatedAtColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, MetadataColumn, PausedAtColumn, UpdatedAtColumn}
|
||||
)
|
||||
|
||||
return riverClientTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
Metadata: MetadataColumn,
|
||||
PausedAt: PausedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user