importer

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 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 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 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