You've already forked reloading-manager
Nobody had ever created a function like this one before. (#26)
Reviewed-on: rrise/reloading-manager#26 Co-authored-by: Ron Rise <ron@siteworxpro.com> Co-committed-by: Ron Rise <ron@siteworxpro.com>
This commit is contained in:
99
backend/.gen/loading/public/table/bullets.go
Normal file
99
backend/.gen/loading/public/table/bullets.go
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// 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 Bullets = newBulletsTable("public", "bullets", "")
|
||||
|
||||
type bulletsTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnString
|
||||
Name postgres.ColumnString
|
||||
Weight postgres.ColumnInteger
|
||||
Diameter postgres.ColumnInteger
|
||||
Meta postgres.ColumnString
|
||||
Photo postgres.ColumnBytea
|
||||
ManufacturerID postgres.ColumnString
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
DefaultColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type BulletsTable struct {
|
||||
bulletsTable
|
||||
|
||||
EXCLUDED bulletsTable
|
||||
}
|
||||
|
||||
// AS creates new BulletsTable with assigned alias
|
||||
func (a BulletsTable) AS(alias string) *BulletsTable {
|
||||
return newBulletsTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new BulletsTable with assigned schema name
|
||||
func (a BulletsTable) FromSchema(schemaName string) *BulletsTable {
|
||||
return newBulletsTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new BulletsTable with assigned table prefix
|
||||
func (a BulletsTable) WithPrefix(prefix string) *BulletsTable {
|
||||
return newBulletsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new BulletsTable with assigned table suffix
|
||||
func (a BulletsTable) WithSuffix(suffix string) *BulletsTable {
|
||||
return newBulletsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newBulletsTable(schemaName, tableName, alias string) *BulletsTable {
|
||||
return &BulletsTable{
|
||||
bulletsTable: newBulletsTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newBulletsTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newBulletsTableImpl(schemaName, tableName, alias string) bulletsTable {
|
||||
var (
|
||||
IDColumn = postgres.StringColumn("id")
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
WeightColumn = postgres.IntegerColumn("weight")
|
||||
DiameterColumn = postgres.IntegerColumn("diameter")
|
||||
MetaColumn = postgres.StringColumn("meta")
|
||||
PhotoColumn = postgres.ByteaColumn("photo")
|
||||
ManufacturerIDColumn = postgres.StringColumn("manufacturer_id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
allColumns = postgres.ColumnList{IDColumn, NameColumn, WeightColumn, DiameterColumn, MetaColumn, PhotoColumn, ManufacturerIDColumn, CreatedAtColumn}
|
||||
mutableColumns = postgres.ColumnList{NameColumn, WeightColumn, DiameterColumn, MetaColumn, PhotoColumn, ManufacturerIDColumn, CreatedAtColumn}
|
||||
defaultColumns = postgres.ColumnList{IDColumn, CreatedAtColumn}
|
||||
)
|
||||
|
||||
return bulletsTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
Name: NameColumn,
|
||||
Weight: WeightColumn,
|
||||
Diameter: DiameterColumn,
|
||||
Meta: MetaColumn,
|
||||
Photo: PhotoColumn,
|
||||
ManufacturerID: ManufacturerIDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
DefaultColumns: defaultColumns,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user