tables

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: BSD-3-Clause Imports: 15 Imported by: 14

Documentation

Overview

package tables implements the `FeatureTable interface` interface for indexing Who's On First Feature records in SQLite database tables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginTransactionError added in v0.10.0

func BeginTransactionError(t sqlite.Table, err error) error

BeginTransactionError returns a new error with a default message for database transaction initialization problems wrapping 'err' and prepending with the value of 't's Name() method.

func CommitTransactionError added in v0.10.0

func CommitTransactionError(t sqlite.Table, err error) error

CommitTransactionError returns a new error with a default message for problems committing database transactions wrapping 'err' and prepending with the value of 't's Name() method.

func CommonTablesWithDatabase

func CommonTablesWithDatabase(ctx context.Context, db sqlite.Database) ([]sqlite.Table, error)

func CommonTablesWithDatabaseAndOptions

func CommonTablesWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, table_opts *CommonTablesOptions) ([]sqlite.Table, error)

func DatabaseConnectionError added in v0.10.0

func DatabaseConnectionError(t sqlite.Table, err error) error

DatabaseConnectionError returns a new error with a default message for database connection problems wrapping 'err' and prepending with the value of 't's Name() method.

func ExecuteStatementError added in v0.10.0

func ExecuteStatementError(t sqlite.Table, err error) error

ExecuteStatementError returns a new error with a default message for problems executing database (SQL) statements wrapping 'err' and prepending with the value of 't's Name() method.

func InitializeTableError added in v0.10.0

func InitializeTableError(t sqlite.Table, err error) error

InitializeTableError returns a new error with a default message for database initialization problems wrapping 'err' and prepending with the value of 't's Name() method.

func MissingPropertyError added in v0.10.0

func MissingPropertyError(t sqlite.Table, prop string, err error) error

MissingPropertyError returns a new error with a default message for problems deriving a given property ('prop') from a record, wrapping 'err' and prepending with the value of 't's Name() method.

func NewAncestorsTable

func NewAncestorsTable(ctx context.Context) (sqlite.Table, error)

func NewAncestorsTableWithDatabase

func NewAncestorsTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewConcordancesTable

func NewConcordancesTable(ctx context.Context) (sqlite.Table, error)

func NewConcordancesTableWithDatabase

func NewConcordancesTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewGeoJSONTable

func NewGeoJSONTable(ctx context.Context) (sqlite.Table, error)

func NewGeoJSONTableWithDatabase

func NewGeoJSONTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewGeoJSONTableWithDatabaseAndOptions

func NewGeoJSONTableWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *GeoJSONTableOptions) (sqlite.Table, error)

func NewGeoJSONTableWithOptions

func NewGeoJSONTableWithOptions(ctx context.Context, opts *GeoJSONTableOptions) (sqlite.Table, error)

func NewGeometriesTable

func NewGeometriesTable(ctx context.Context) (sqlite.Table, error)

func NewGeometriesTableWithDatabase

func NewGeometriesTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewGeometriesTableWithDatabaseAndOptions added in v0.2.4

func NewGeometriesTableWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *GeometriesTableOptions) (sqlite.Table, error)

func NewGeometriesTableWithOptions added in v0.2.4

func NewGeometriesTableWithOptions(ctx context.Context, opts *GeometriesTableOptions) (sqlite.Table, error)

func NewNamesTable

func NewNamesTable(ctx context.Context) (sqlite.Table, error)

func NewNamesTableWithDatabase

func NewNamesTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewPropertiesTable added in v0.6.0

func NewPropertiesTable(ctx context.Context) (sqlite.Table, error)

func NewPropertiesTableWithDatabase added in v0.6.0

func NewPropertiesTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewPropertiesTableWithDatabaseAndOptions added in v0.6.0

func NewPropertiesTableWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *PropertiesTableOptions) (sqlite.Table, error)

func NewPropertiesTableWithOptions added in v0.6.0

func NewPropertiesTableWithOptions(ctx context.Context, opts *PropertiesTableOptions) (sqlite.Table, error)

func NewRTreeTable added in v0.3.0

func NewRTreeTable(ctx context.Context) (sqlite.Table, error)

func NewRTreeTableWithDatabase added in v0.3.0

func NewRTreeTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewRTreeTableWithDatabaseAndOptions added in v0.3.0

func NewRTreeTableWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *RTreeTableOptions) (sqlite.Table, error)

func NewRTreeTableWithOptions added in v0.3.0

func NewRTreeTableWithOptions(ctx context.Context, opts *RTreeTableOptions) (sqlite.Table, error)

func NewSPRTable

func NewSPRTable(ctx context.Context) (sqlite.Table, error)

func NewSPRTableWithDatabase

func NewSPRTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewSPRTableWithDatabaseAndOptions added in v0.6.0

func NewSPRTableWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *SPRTableOptions) (sqlite.Table, error)

func NewSPRTableWithOptions added in v0.6.0

func NewSPRTableWithOptions(ctx context.Context, opts *SPRTableOptions) (sqlite.Table, error)

func NewSearchTable

func NewSearchTable(ctx context.Context) (sqlite.Table, error)

func NewSearchTableWithDatabase

func NewSearchTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func NewSupersedesTable added in v0.6.6

func NewSupersedesTable(ctx context.Context) (sqlite.Table, error)

func NewSupersedesTableWithDatabase added in v0.6.6

func NewSupersedesTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.Table, error)

func PointInPolygonTablesWithDatabase

func PointInPolygonTablesWithDatabase(ctx context.Context, db sqlite.Database) ([]sqlite.Table, error)

func PrepareStatementError added in v0.10.0

func PrepareStatementError(t sqlite.Table, err error) error

PrepareStatementError returns a new error with a default message for problems preparing database (SQL) statements wrapping 'err' and prepending with the value of 't's Name() method.

func RTreeTablesWithDatabase added in v0.6.4

func RTreeTablesWithDatabase(ctx context.Context, db sqlite.Database) ([]sqlite.Table, error)

func RTreeTablesWithDatabaseAndOptions added in v0.6.4

func RTreeTablesWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *TableOptions) ([]sqlite.Table, error)

func SearchTablesWithDatabase

func SearchTablesWithDatabase(ctx context.Context, db sqlite.Database) ([]sqlite.Table, error)

func SearchTablesWithDatabaseAndOptions added in v0.6.4

func SearchTablesWithDatabaseAndOptions(ctx context.Context, db sqlite.Database, opts *TableOptions) ([]sqlite.Table, error)

func SpatialTablesWithDatabase

func SpatialTablesWithDatabase(ctx context.Context, db sqlite.Database) ([]sqlite.Table, error)

func WrapError added in v0.10.0

func WrapError(t sqlite.Table, err error) error

WrapError returns a new error wrapping 'err' and prepending with the value of 't's Name() method.

Types

type AncestorsRow

type AncestorsRow struct {
	Id                int64
	AncestorID        int64
	AncestorPlacetype string
	LastModified      int64
}

type AncestorsTable

type AncestorsTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*AncestorsTable) IndexFeature

func (t *AncestorsTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*AncestorsTable) IndexRecord

func (t *AncestorsTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*AncestorsTable) InitializeTable

func (t *AncestorsTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*AncestorsTable) Name

func (t *AncestorsTable) Name() string

func (*AncestorsTable) Schema

func (t *AncestorsTable) Schema() string

type CommonTablesOptions

type CommonTablesOptions struct {
	GeoJSON       *GeoJSONTableOptions // DEPRECATED
	IndexAltFiles bool
}

type ConcordancesRow

type ConcordancesRow struct {
	Id           int64
	OtherID      string
	OtherSource  string
	LastModified int64
}

type ConcordancesTable

type ConcordancesTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*ConcordancesTable) IndexFeature

func (t *ConcordancesTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*ConcordancesTable) IndexRecord

func (t *ConcordancesTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*ConcordancesTable) InitializeTable

func (t *ConcordancesTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*ConcordancesTable) Name

func (t *ConcordancesTable) Name() string

func (*ConcordancesTable) Schema

func (t *ConcordancesTable) Schema() string

type GeoJSONRow

type GeoJSONRow struct {
	Id           int64
	Body         string
	LastModified int64
}

type GeoJSONTable

type GeoJSONTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*GeoJSONTable) IndexFeature

func (t *GeoJSONTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*GeoJSONTable) IndexRecord

func (t *GeoJSONTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*GeoJSONTable) InitializeTable

func (t *GeoJSONTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*GeoJSONTable) Name

func (t *GeoJSONTable) Name() string

func (*GeoJSONTable) Schema

func (t *GeoJSONTable) Schema() string

type GeoJSONTableOptions

type GeoJSONTableOptions struct {
	IndexAltFiles          bool
	AllowMissingSourceGeom bool
}

func DefaultGeoJSONTableOptions

func DefaultGeoJSONTableOptions() (*GeoJSONTableOptions, error)

type GeometriesRow

type GeometriesRow struct {
	Id           int64
	Body         string
	LastModified int64
}

type GeometriesTable

type GeometriesTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*GeometriesTable) IndexFeature

func (t *GeometriesTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*GeometriesTable) IndexRecord

func (t *GeometriesTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*GeometriesTable) InitializeTable

func (t *GeometriesTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*GeometriesTable) Name

func (t *GeometriesTable) Name() string

func (*GeometriesTable) Schema

func (t *GeometriesTable) Schema() string

type GeometriesTableOptions added in v0.2.4

type GeometriesTableOptions struct {
	IndexAltFiles bool
}

func DefaultGeometriesTableOptions added in v0.2.4

func DefaultGeometriesTableOptions() (*GeometriesTableOptions, error)

type NamesRow

type NamesRow struct {
	Id           int64
	Placetype    string
	Country      string
	Language     string
	ExtLang      string
	Script       string
	Region       string
	Variant      string
	Extension    string
	PrivateUse   string
	Name         string
	LastModified int64
}

type NamesTable

type NamesTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*NamesTable) IndexFeature

func (t *NamesTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*NamesTable) IndexRecord

func (t *NamesTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*NamesTable) InitializeTable

func (t *NamesTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*NamesTable) Name

func (t *NamesTable) Name() string

func (*NamesTable) Schema

func (t *NamesTable) Schema() string

type PropertiesRow added in v0.6.0

type PropertiesRow struct {
	Id           int64
	Body         string
	LastModified int64
}

type PropertiesTable added in v0.6.0

type PropertiesTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*PropertiesTable) IndexFeature added in v0.6.0

func (t *PropertiesTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*PropertiesTable) IndexRecord added in v0.6.0

func (t *PropertiesTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*PropertiesTable) InitializeTable added in v0.6.0

func (t *PropertiesTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*PropertiesTable) Name added in v0.6.0

func (t *PropertiesTable) Name() string

func (*PropertiesTable) Schema added in v0.6.0

func (t *PropertiesTable) Schema() string

type PropertiesTableOptions added in v0.6.0

type PropertiesTableOptions struct {
	IndexAltFiles bool
}

func DefaultPropertiesTableOptions added in v0.6.0

func DefaultPropertiesTableOptions() (*PropertiesTableOptions, error)

type RTreeTable added in v0.3.0

type RTreeTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*RTreeTable) IndexFeature added in v0.3.0

func (t *RTreeTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*RTreeTable) IndexRecord added in v0.3.0

func (t *RTreeTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*RTreeTable) InitializeTable added in v0.3.0

func (t *RTreeTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*RTreeTable) Name added in v0.3.0

func (t *RTreeTable) Name() string

func (*RTreeTable) Schema added in v0.3.0

func (t *RTreeTable) Schema() string

type RTreeTableOptions added in v0.3.0

type RTreeTableOptions struct {
	IndexAltFiles bool
}

func DefaultRTreeTableOptions added in v0.3.0

func DefaultRTreeTableOptions() (*RTreeTableOptions, error)

type SPRTable

type SPRTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*SPRTable) IndexFeature

func (t *SPRTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*SPRTable) IndexRecord

func (t *SPRTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*SPRTable) InitializeTable

func (t *SPRTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*SPRTable) Name

func (t *SPRTable) Name() string

func (*SPRTable) Schema

func (t *SPRTable) Schema() string

type SPRTableOptions added in v0.6.0

type SPRTableOptions struct {
	IndexAltFiles bool
}

func DefaultSPRTableOptions added in v0.6.0

func DefaultSPRTableOptions() (*SPRTableOptions, error)

type SearchTable

type SearchTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*SearchTable) IndexFeature

func (t *SearchTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*SearchTable) IndexRecord

func (t *SearchTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*SearchTable) InitializeTable

func (t *SearchTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*SearchTable) Name

func (t *SearchTable) Name() string

func (*SearchTable) Schema

func (t *SearchTable) Schema() string

type SupersedesTable added in v0.6.6

type SupersedesTable struct {
	features.FeatureTable
	// contains filtered or unexported fields
}

func (*SupersedesTable) IndexFeature added in v0.6.6

func (t *SupersedesTable) IndexFeature(ctx context.Context, db sqlite.Database, f []byte) error

func (*SupersedesTable) IndexRecord added in v0.6.6

func (t *SupersedesTable) IndexRecord(ctx context.Context, db sqlite.Database, i interface{}) error

func (*SupersedesTable) InitializeTable added in v0.6.6

func (t *SupersedesTable) InitializeTable(ctx context.Context, db sqlite.Database) error

func (*SupersedesTable) Name added in v0.6.6

func (t *SupersedesTable) Name() string

func (*SupersedesTable) Schema added in v0.6.6

func (t *SupersedesTable) Schema() string

type TableOptions added in v0.6.4

type TableOptions struct {
	IndexAltFiles bool
}

Jump to

Keyboard shortcuts

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