sqlite

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package sqlite provides methods for working with Library of Congress (LoC) data in an SFO Museum context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIdentifiersLookup added in v0.4.0

func NewIdentifiersLookup(ctx context.Context, dsn string, data_uris map[string]string) (libraryofcongress.Lookup, error)

NewIdentifiersLookup() returns a new `libraryofcongress.Lookup` for a `aaronland/go-sqlite/database.SQLiteDatabase` instance (identified) by 'dsn' which is produced using the `NewIdentifiersDatabase()` method. This is primarily a helper method used by the `flysfo:go-sfomuseum-data-filemaker/cmd/merge-filemaker-objects-export` tool.

func NewIndentifiersDatabase added in v0.4.0

func NewIndentifiersDatabase(ctx context.Context, dsn string, data_uris map[string]string) (*database.SQLiteDatabase, error)

NewIdentifiersDatabase() returns a `aaronland/go-sqlite/database.SQLiteDatabase` instance that has a 'identifers' table (sfomuseum/go-libraryofcongress-database/sqlite/tables) which has been indexed using the LCSH and LCNAF data bundled with `sfomuseum/go-sfomuseum-libraryofcongress`. This is primarily a helper method used by the `flysfo:go-sfomuseum-data-filemaker/cmd/merge-filemaker-objects-export` tool.

func NewSQLiteLookup

func NewSQLiteLookup(ctx context.Context, uri string) (libraryofcongress.Lookup, error)

func NewSQLiteLookupWithDatabase added in v0.2.1

func NewSQLiteLookupWithDatabase(ctx context.Context, db *database.SQLiteDatabase) (libraryofcongress.Lookup, error)

Types

type SQLiteLookup

type SQLiteLookup struct {
	libraryofcongress.Lookup
	// contains filtered or unexported fields
}

func (*SQLiteLookup) Append

func (l *SQLiteLookup) Append(ctx context.Context, data interface{}) error

func (*SQLiteLookup) Find

func (l *SQLiteLookup) Find(ctx context.Context, code string) ([]interface{}, error)

Jump to

Keyboard shortcuts

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