database

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package database defines interfaces to be implemented.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, f func(Config, *config.Mapping) (DB, error))

Types

type BulkBeginner

type BulkBeginner interface {
	BeginBulk() error
}

type Config

type Config struct {
	ConnectionParams string
	Srid             int
	ImportSchema     string
	ProductionSchema string
	BackupSchema     string
}

type DB

type DB interface {
	Begin() error
	End() error
	Abort() error
	Init() error
	Close() error
	Inserter
}

func Open

func Open(conf Config, m *config.Mapping) (DB, error)

type Deleter

type Deleter interface {
	Inserter
	Delete(int64, []mapping.Match) error
}

type Deployer

type Deployer interface {
	Deploy() error
	RevertDeploy() error
	RemoveBackup() error
}

type Finisher

type Finisher interface {
	Finish() error
}

type Generalizer

type Generalizer interface {
	Generalize() error
	EnableGeneralizeUpdates()
	GeneralizeUpdates() error
}

type Inserter

type Inserter interface {
	// InsertXxx inserts element of that type into the database.
	// element.Geom is set to that type.
	InsertPoint(osm.Element, geom.Geometry, []mapping.Match) error
	InsertLineString(osm.Element, geom.Geometry, []mapping.Match) error
	InsertPolygon(osm.Element, geom.Geometry, []mapping.Match) error
	InsertRelationMember(osm.Relation, osm.Member, geom.Geometry, []mapping.Match) error
}

type Optimizer

type Optimizer interface {
	Optimize() error
}

Directories

Path Synopsis
Package postgis implements the database interfaces for PostGIS.
Package postgis implements the database interfaces for PostGIS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL