importer

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package importer exposes stable data import helpers backed by tinySQL's internal importer implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFile

func OpenFile(ctx context.Context, filePath string, opts *ImportOptions) (*tinysql.DB, string, error)

OpenFile creates a new DB and imports filePath into it.

Types

type FuzzyImportOptions

type FuzzyImportOptions = ii.FuzzyImportOptions

FuzzyImportOptions extends ImportOptions with tolerant parsing behavior.

type ImportOptions

type ImportOptions = ii.ImportOptions

ImportOptions controls structured data imports.

type ImportResult

type ImportResult = ii.ImportResult

ImportResult contains metadata about an import operation.

func FuzzyImportCSV

func FuzzyImportCSV(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *FuzzyImportOptions) (*ImportResult, error)

FuzzyImportCSV imports malformed CSV-like data using tolerant parsing.

func FuzzyImportJSON

func FuzzyImportJSON(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *FuzzyImportOptions) (*ImportResult, error)

FuzzyImportJSON imports malformed JSON-like data using tolerant parsing.

func ImportCSV

func ImportCSV(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportCSV imports CSV or TSV-like data from src.

func ImportFile

func ImportFile(ctx context.Context, db *tinysql.DB, tenant, tableName, filePath string, opts *ImportOptions) (*ImportResult, error)

ImportFile detects a file format and imports it into a table.

func ImportGeoJSON

func ImportGeoJSON(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportGeoJSON imports GeoJSON feature data from src.

func ImportJSON

func ImportJSON(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportJSON imports JSON or NDJSON-like data from src.

func ImportKML

func ImportKML(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportKML imports KML placemark data from src.

func ImportMBTiles added in v0.14.0

func ImportMBTiles(ctx context.Context, db *tinysql.DB, tenant, tableName, filePath string, opts *ImportOptions) (*ImportResult, error)

ImportMBTiles imports tiles from an MBTiles SQLite database path.

func ImportMBTilesReader added in v0.14.0

func ImportMBTilesReader(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportMBTilesReader imports MBTiles from src by spooling to a temporary SQLite file.

func ImportOSM added in v0.14.0

func ImportOSM(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportOSM imports OSM XML (.osm or .osm.xml) from src.

func ImportRoutingGraph added in v0.14.0

func ImportRoutingGraph(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportRoutingGraph imports routing graph JSON or CSV edge-list data from src.

func ImportShapefile

func ImportShapefile(ctx context.Context, db *tinysql.DB, tenant, tableName, filePath string, opts *ImportOptions) (*ImportResult, error)

ImportShapefile imports an ESRI Shapefile path into a table.

func ImportShapefileZip added in v0.14.0

func ImportShapefileZip(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportShapefileZip imports a ZIP archive containing Shapefile sidecar files from src.

func ImportXML

func ImportXML(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportXML imports row-oriented XML from src.

func ImportYAML

func ImportYAML(ctx context.Context, db *tinysql.DB, tenant, tableName string, src io.Reader, opts *ImportOptions) (*ImportResult, error)

ImportYAML imports a YAML mapping or sequence of mappings from src.

Jump to

Keyboard shortcuts

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