csv

package
v2.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 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(config backend.DataSourceInstanceSettings) sqlds.DriverSettings

Jump to

Keyboard shortcuts

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