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:
81
backend/.gen/loading/public/table/schema_migrations.go
Normal file
81
backend/.gen/loading/public/table/schema_migrations.go
Normal file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// 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 SchemaMigrations = newSchemaMigrationsTable("public", "schema_migrations", "")
|
||||
|
||||
type schemaMigrationsTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
Version postgres.ColumnInteger
|
||||
Dirty postgres.ColumnBool
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
DefaultColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type SchemaMigrationsTable struct {
|
||||
schemaMigrationsTable
|
||||
|
||||
EXCLUDED schemaMigrationsTable
|
||||
}
|
||||
|
||||
// AS creates new SchemaMigrationsTable with assigned alias
|
||||
func (a SchemaMigrationsTable) AS(alias string) *SchemaMigrationsTable {
|
||||
return newSchemaMigrationsTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new SchemaMigrationsTable with assigned schema name
|
||||
func (a SchemaMigrationsTable) FromSchema(schemaName string) *SchemaMigrationsTable {
|
||||
return newSchemaMigrationsTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new SchemaMigrationsTable with assigned table prefix
|
||||
func (a SchemaMigrationsTable) WithPrefix(prefix string) *SchemaMigrationsTable {
|
||||
return newSchemaMigrationsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new SchemaMigrationsTable with assigned table suffix
|
||||
func (a SchemaMigrationsTable) WithSuffix(suffix string) *SchemaMigrationsTable {
|
||||
return newSchemaMigrationsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newSchemaMigrationsTable(schemaName, tableName, alias string) *SchemaMigrationsTable {
|
||||
return &SchemaMigrationsTable{
|
||||
schemaMigrationsTable: newSchemaMigrationsTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newSchemaMigrationsTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newSchemaMigrationsTableImpl(schemaName, tableName, alias string) schemaMigrationsTable {
|
||||
var (
|
||||
VersionColumn = postgres.IntegerColumn("version")
|
||||
DirtyColumn = postgres.BoolColumn("dirty")
|
||||
allColumns = postgres.ColumnList{VersionColumn, DirtyColumn}
|
||||
mutableColumns = postgres.ColumnList{DirtyColumn}
|
||||
defaultColumns = postgres.ColumnList{}
|
||||
)
|
||||
|
||||
return schemaMigrationsTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
Version: VersionColumn,
|
||||
Dirty: DirtyColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
DefaultColumns: defaultColumns,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user