sqlutils

package
v0.0.0-...-854b266 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVImporter

type CSVImporter struct {
	// contains filtered or unexported fields
}

csvimport covers the entire import

func NewCSVImporter

func NewCSVImporter(schema string) *CSVImporter

func (*CSVImporter) Import

func (a *CSVImporter) Import(n string, r io.ReadCloser) error

CSVImport handles the importing of CSV data into a table. If the inbound data has a pair of columns called "Easting","Northing" or "Longitude","Latitude" then it will also handle populating a geom column with a point, using EPSG:2700 or EPSG:4326 accordingly.

func (*CSVImporter) Init

func (a *CSVImporter) Init(k *kernel.Kernel) error

func (*CSVImporter) Name

func (a *CSVImporter) Name() string

type SchemaImport

type SchemaImport struct {
	// contains filtered or unexported fields
}

SchemaImport is a Kernel service which will configure a PostgreSQL/PostGIS database if a specified schema does not exist.

func NewSchemaImport

func NewSchemaImport(schema string, assetString func(string) (string, error), assetNames func() []string) *SchemaImport

func (*SchemaImport) Init

func (a *SchemaImport) Init(k *kernel.Kernel) error

func (*SchemaImport) Installed

func (a *SchemaImport) Installed() bool

Installed returns true if the database was initialised

func (*SchemaImport) Name

func (a *SchemaImport) Name() string

func (*SchemaImport) SchemaExists

func (a *SchemaImport) SchemaExists(schema string) (bool, error)

SchemaExists returns true if a schema exists, false if not

func (*SchemaImport) Start

func (a *SchemaImport) Start() error

Jump to

Keyboard shortcuts

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