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:
87
backend/.gen/loading/public/table/manufacturers.go
Normal file
87
backend/.gen/loading/public/table/manufacturers.go
Normal file
@@ -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 Manufacturers = newManufacturersTable("public", "manufacturers", "")
|
||||
|
||||
type manufacturersTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnString
|
||||
Name postgres.ColumnString
|
||||
URL postgres.ColumnString
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
DefaultColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type ManufacturersTable struct {
|
||||
manufacturersTable
|
||||
|
||||
EXCLUDED manufacturersTable
|
||||
}
|
||||
|
||||
// AS creates new ManufacturersTable with assigned alias
|
||||
func (a ManufacturersTable) AS(alias string) *ManufacturersTable {
|
||||
return newManufacturersTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new ManufacturersTable with assigned schema name
|
||||
func (a ManufacturersTable) FromSchema(schemaName string) *ManufacturersTable {
|
||||
return newManufacturersTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new ManufacturersTable with assigned table prefix
|
||||
func (a ManufacturersTable) WithPrefix(prefix string) *ManufacturersTable {
|
||||
return newManufacturersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new ManufacturersTable with assigned table suffix
|
||||
func (a ManufacturersTable) WithSuffix(suffix string) *ManufacturersTable {
|
||||
return newManufacturersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newManufacturersTable(schemaName, tableName, alias string) *ManufacturersTable {
|
||||
return &ManufacturersTable{
|
||||
manufacturersTable: newManufacturersTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newManufacturersTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newManufacturersTableImpl(schemaName, tableName, alias string) manufacturersTable {
|
||||
var (
|
||||
IDColumn = postgres.StringColumn("id")
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
URLColumn = postgres.StringColumn("url")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
allColumns = postgres.ColumnList{IDColumn, NameColumn, URLColumn, CreatedAtColumn}
|
||||
mutableColumns = postgres.ColumnList{NameColumn, URLColumn, CreatedAtColumn}
|
||||
defaultColumns = postgres.ColumnList{IDColumn, CreatedAtColumn}
|
||||
)
|
||||
|
||||
return manufacturersTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
Name: NameColumn,
|
||||
URL: URLColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
DefaultColumns: defaultColumns,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user