csv

package
v3.0.0-...-890dad5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MockDataFolder = "/mock-data"

MockDataFolder is the default folder that will contain data files

Variables

This section is empty.

Functions

func CreateMockData

func CreateMockData(table string, folder string, csvData string) error

CreateData will create a "table" (csv file) in the data folder that can be queried with SQL

func CreateMockTable

func CreateMockTable(table string, folder string) error

Create will create a "table" (csv file) in the data folder that can be queried with SQL

Types

type SQLCSVMock

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

SQLCSVMock connects to a local folder with csv files

func (*SQLCSVMock) Connect

Connect opens a sql.DB connection using datasource settings

func (*SQLCSVMock) Converters

func (h *SQLCSVMock) Converters() []sqlutil.Converter

Converters defines list of string convertors

func (*SQLCSVMock) Macros

func (h *SQLCSVMock) Macros() sqlds.Macros

Macros returns list of macro functions convert the macros of raw query

func (*SQLCSVMock) Settings

func (h *SQLCSVMock) Settings(_ context.Context, _ backend.DataSourceInstanceSettings) sqlds.DriverSettings

Jump to

Keyboard shortcuts

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