//
// 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 RasterColumns = newRasterColumnsTable("public", "raster_columns", "")

type rasterColumnsTable struct {
	postgres.Table

	// Columns
	RTableCatalog   postgres.ColumnString
	RTableSchema    postgres.ColumnString
	RTableName      postgres.ColumnString
	RRasterColumn   postgres.ColumnString
	Srid            postgres.ColumnInteger
	ScaleX          postgres.ColumnFloat
	ScaleY          postgres.ColumnFloat
	BlocksizeX      postgres.ColumnInteger
	BlocksizeY      postgres.ColumnInteger
	SameAlignment   postgres.ColumnBool
	RegularBlocking postgres.ColumnBool
	NumBands        postgres.ColumnInteger
	PixelTypes      postgres.ColumnStringArray
	NodataValues    postgres.ColumnFloatArray
	OutDb           postgres.ColumnBoolArray
	Extent          postgres.ColumnGeometry
	SpatialIndex    postgres.ColumnBool

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

type RasterColumnsTable struct {
	rasterColumnsTable

	EXCLUDED rasterColumnsTable
}

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

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

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

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

func newRasterColumnsTable(schemaName, tableName, alias string) *RasterColumnsTable {
	return &RasterColumnsTable{
		rasterColumnsTable: newRasterColumnsTableImpl(schemaName, tableName, alias),
		EXCLUDED:           newRasterColumnsTableImpl("", "excluded", ""),
	}
}

func newRasterColumnsTableImpl(schemaName, tableName, alias string) rasterColumnsTable {
	var (
		RTableCatalogColumn   = postgres.StringColumn("r_table_catalog")
		RTableSchemaColumn    = postgres.StringColumn("r_table_schema")
		RTableNameColumn      = postgres.StringColumn("r_table_name")
		RRasterColumnColumn   = postgres.StringColumn("r_raster_column")
		SridColumn            = postgres.IntegerColumn("srid")
		ScaleXColumn          = postgres.FloatColumn("scale_x")
		ScaleYColumn          = postgres.FloatColumn("scale_y")
		BlocksizeXColumn      = postgres.IntegerColumn("blocksize_x")
		BlocksizeYColumn      = postgres.IntegerColumn("blocksize_y")
		SameAlignmentColumn   = postgres.BoolColumn("same_alignment")
		RegularBlockingColumn = postgres.BoolColumn("regular_blocking")
		NumBandsColumn        = postgres.IntegerColumn("num_bands")
		PixelTypesColumn      = postgres.StringArrayColumn("pixel_types")
		NodataValuesColumn    = postgres.FloatArrayColumn("nodata_values")
		OutDbColumn           = postgres.BoolArrayColumn("out_db")
		ExtentColumn          = postgres.GeometryColumn("extent")
		SpatialIndexColumn    = postgres.BoolColumn("spatial_index")
		allColumns            = postgres.ColumnList{RTableCatalogColumn, RTableSchemaColumn, RTableNameColumn, RRasterColumnColumn, SridColumn, ScaleXColumn, ScaleYColumn, BlocksizeXColumn, BlocksizeYColumn, SameAlignmentColumn, RegularBlockingColumn, NumBandsColumn, PixelTypesColumn, NodataValuesColumn, OutDbColumn, ExtentColumn, SpatialIndexColumn}
		mutableColumns        = postgres.ColumnList{RTableCatalogColumn, RTableSchemaColumn, RTableNameColumn, RRasterColumnColumn, SridColumn, ScaleXColumn, ScaleYColumn, BlocksizeXColumn, BlocksizeYColumn, SameAlignmentColumn, RegularBlockingColumn, NumBandsColumn, PixelTypesColumn, NodataValuesColumn, OutDbColumn, ExtentColumn, SpatialIndexColumn}
		defaultColumns        = postgres.ColumnList{}
	)

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

		//Columns
		RTableCatalog:   RTableCatalogColumn,
		RTableSchema:    RTableSchemaColumn,
		RTableName:      RTableNameColumn,
		RRasterColumn:   RRasterColumnColumn,
		Srid:            SridColumn,
		ScaleX:          ScaleXColumn,
		ScaleY:          ScaleYColumn,
		BlocksizeX:      BlocksizeXColumn,
		BlocksizeY:      BlocksizeYColumn,
		SameAlignment:   SameAlignmentColumn,
		RegularBlocking: RegularBlockingColumn,
		NumBands:        NumBandsColumn,
		PixelTypes:      PixelTypesColumn,
		NodataValues:    NodataValuesColumn,
		OutDb:           OutDbColumn,
		Extent:          ExtentColumn,
		SpatialIndex:    SpatialIndexColumn,

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