// 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:    "public.countrytype",
			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,
		},
		Geom: column{
			Name:      "geom",
			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,
		},
		Number: column{
			Name:      "number_",
			DBType:    "integer",
			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,
		},
	},
	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{},
		},
		AddressCountryLocalityUnitNumberStreetKey: index{
			Type: "btree",
			Name: "address_country_locality_unit_number__street_key",
			Columns: []indexColumn{
				{
					Name:         "country",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "locality",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "unit",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "number_",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "street",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false, false, false, false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
		IdxAddressGeom: index{
			Type: "gist",
			Name: "idx_address_geom",
			Columns: []indexColumn{
				{
					Name:         "geom",
					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{
		AddressCountryLocalityUnitNumberStreetKey: constraint{
			Name:    "address_country_locality_unit_number__street_key",
			Columns: []string{"country", "locality", "unit", "number_", "street"},
			Comment: "",
		},
	},

	Comment: "",
}

type addressColumns struct {
	Country    column
	Created    column
	Geom       column
	H3cell     column
	ID         column
	Locality   column
	Number     column
	PostalCode column
	Street     column
	Unit       column
}

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

type addressIndexes struct {
	AddressPkey                               index
	AddressCountryLocalityUnitNumberStreetKey index
	IdxAddressGeom                            index
}

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

type addressForeignKeys struct{}

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

type addressUniques struct {
	AddressCountryLocalityUnitNumberStreetKey constraint
}

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

type addressChecks struct{}

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