//
// 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 view

import (
	"github.com/Gleipnir-Technology/jet/postgres"
)

var GeographyColumns = newGeographyColumnsTable("public", "geography_columns", "")

type geographyColumnsTable struct {
	postgres.Table

	// Columns
	FTableCatalog    postgres.ColumnString
	FTableSchema     postgres.ColumnString
	FTableName       postgres.ColumnString
	FGeographyColumn postgres.ColumnString
	CoordDimension   postgres.ColumnInteger
	Srid             postgres.ColumnInteger
	Type             postgres.ColumnString

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
	DefaultColumns postgres.ColumnList
}

type GeographyColumnsTable struct {
	geographyColumnsTable

	EXCLUDED geographyColumnsTable
}

// AS creates new GeographyColumnsTable with assigned alias
func (a GeographyColumnsTable) AS(alias string) *GeographyColumnsTable {
	return newGeographyColumnsTable(a.SchemaName(), a.TableName(), alias)
}

// Schema creates new GeographyColumnsTable with assigned schema name
func (a GeographyColumnsTable) FromSchema(schemaName string) *GeographyColumnsTable {
	return newGeographyColumnsTable(schemaName, a.TableName(), a.Alias())
}

// WithPrefix creates new GeographyColumnsTable with assigned table prefix
func (a GeographyColumnsTable) WithPrefix(prefix string) *GeographyColumnsTable {
	return newGeographyColumnsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}

// WithSuffix creates new GeographyColumnsTable with assigned table suffix
func (a GeographyColumnsTable) WithSuffix(suffix string) *GeographyColumnsTable {
	return newGeographyColumnsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}

func newGeographyColumnsTable(schemaName, tableName, alias string) *GeographyColumnsTable {
	return &GeographyColumnsTable{
		geographyColumnsTable: newGeographyColumnsTableImpl(schemaName, tableName, alias),
		EXCLUDED:              newGeographyColumnsTableImpl("", "excluded", ""),
	}
}

func newGeographyColumnsTableImpl(schemaName, tableName, alias string) geographyColumnsTable {
	var (
		FTableCatalogColumn    = postgres.StringColumn("f_table_catalog")
		FTableSchemaColumn     = postgres.StringColumn("f_table_schema")
		FTableNameColumn       = postgres.StringColumn("f_table_name")
		FGeographyColumnColumn = postgres.StringColumn("f_geography_column")
		CoordDimensionColumn   = postgres.IntegerColumn("coord_dimension")
		SridColumn             = postgres.IntegerColumn("srid")
		TypeColumn             = postgres.StringColumn("type")
		allColumns             = postgres.ColumnList{FTableCatalogColumn, FTableSchemaColumn, FTableNameColumn, FGeographyColumnColumn, CoordDimensionColumn, SridColumn, TypeColumn}
		mutableColumns         = postgres.ColumnList{FTableCatalogColumn, FTableSchemaColumn, FTableNameColumn, FGeographyColumnColumn, CoordDimensionColumn, SridColumn, TypeColumn}
		defaultColumns         = postgres.ColumnList{}
	)

	return geographyColumnsTable{
		Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),

		//Columns
		FTableCatalog:    FTableCatalogColumn,
		FTableSchema:     FTableSchemaColumn,
		FTableName:       FTableNameColumn,
		FGeographyColumn: FGeographyColumnColumn,
		CoordDimension:   CoordDimensionColumn,
		Srid:             SridColumn,
		Type:             TypeColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
		DefaultColumns: defaultColumns,
	}
}
