// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.

package dbinfo

import "github.com/aarondl/opt/null"

var Addresses = Table[
	addressColumns,
	addressIndexes,
	addressForeignKeys,
	addressUniques,
	addressChecks,
]{
	Schema: "",
	Name:   "address",
	Columns: addressColumns{
		Country: column{
			Name:      "country",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Location: column{
			Name:      "location",
			DBType:    "geometry",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		H3cell: column{
			Name:      "h3cell",
			DBType:    "h3index",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('address_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Locality: column{
			Name:      "locality",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PostalCode: column{
			Name:      "postal_code",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Street: column{
			Name:      "street",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Unit: column{
			Name:      "unit",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Region: column{
			Name:      "region",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Number: column{
			Name:      "number_",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Gid: column{
			Name:      "gid",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: addressIndexes{
		AddressPkey: index{
			Type: "btree",
			Name: "address_pkey",
			Columns: []indexColumn{
				{
					Name:         "id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
		AddressGidUnique: index{
			Type: "btree",
			Name: "address_gid_unique",
			Columns: []indexColumn{
				{
					Name:         "gid",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
		IdxAddressGeom: index{
			Type: "gist",
			Name: "idx_address_geom",
			Columns: []indexColumn{
				{
					Name:         "location",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        false,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "address_pkey",
		Columns: []string{"id"},
		Comment: "",
	},

	Uniques: addressUniques{
		AddressGidUnique: constraint{
			Name:    "address_gid_unique",
			Columns: []string{"gid"},
			Comment: "",
		},
	},

	Comment: "",
}

type addressColumns struct {
	Country    column
	Created    column
	Location   column
	H3cell     column
	ID         column
	Locality   column
	PostalCode column
	Street     column
	Unit       column
	Region     column
	Number     column
	Gid        column
}

func (c addressColumns) AsSlice() []column {
	return []column{
		c.Country, c.Created, c.Location, c.H3cell, c.ID, c.Locality, c.PostalCode, c.Street, c.Unit, c.Region, c.Number, c.Gid,
	}
}

type addressIndexes struct {
	AddressPkey      index
	AddressGidUnique index
	IdxAddressGeom   index
}

func (i addressIndexes) AsSlice() []index {
	return []index{
		i.AddressPkey, i.AddressGidUnique, i.IdxAddressGeom,
	}
}

type addressForeignKeys struct{}

func (f addressForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{}
}

type addressUniques struct {
	AddressGidUnique constraint
}

func (u addressUniques) AsSlice() []constraint {
	return []constraint{
		u.AddressGidUnique,
	}
}

type addressChecks struct{}

func (c addressChecks) AsSlice() []check {
	return []check{}
}
