xlsx

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package xlsx implements the sq driver for Microsoft Excel.

Index

Constants

View Source
const (
	// Type is the sq source driver type for XLSX.
	Type = source.DriverType("xlsx")
)

Variables

This section is empty.

Functions

func DetectXLSX

func DetectXLSX(ctx context.Context, openFn source.FileOpenFunc) (detected source.DriverType, score float32,
	err error,
)

DetectXLSX implements source.DriverDetectFunc, returning TypeXLSX and a score of 1.0 if valid XLSX.

Types

type Driver

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

Driver implements driver.Driver.

func (*Driver) DriverMetadata

func (d *Driver) DriverMetadata() driver.Metadata

DriverMetadata implements driver.Driver.

func (*Driver) Open

func (d *Driver) Open(ctx context.Context, src *source.Source) (driver.Database, error)

Open implements driver.DatabaseOpener.

func (*Driver) Ping

func (d *Driver) Ping(ctx context.Context, src *source.Source) (err error)

Ping implements driver.Driver.

func (*Driver) Truncate

func (d *Driver) Truncate(_ context.Context, src *source.Source, _ string, _ bool) (affected int64, err error)

Truncate implements driver.Driver.

func (*Driver) ValidateSource

func (d *Driver) ValidateSource(src *source.Source) (*source.Source, error)

ValidateSource implements driver.Driver.

type Provider

type Provider struct {
	Log       *slog.Logger
	Files     *source.Files
	Scratcher driver.ScratchDatabaseOpener
}

Provider implements driver.Provider.

func (*Provider) DriverFor

func (p *Provider) DriverFor(typ source.DriverType) (driver.Driver, error)

DriverFor implements driver.Provider.

Jump to

Keyboard shortcuts

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