Documentation ¶
Index ¶
- Constants
- func CreateMockData(table string, folder string, csvData string) error
- func CreateMockTable(table string, folder string) error
- type SQLCSVMock
- func (h *SQLCSVMock) Connect(_ context.Context, _ backend.DataSourceInstanceSettings, msg json.RawMessage) (*sql.DB, error)
- func (h *SQLCSVMock) Converters() []sqlutil.Converter
- func (h *SQLCSVMock) Macros() sqlds.Macros
- func (h *SQLCSVMock) Settings(_ context.Context, _ backend.DataSourceInstanceSettings) sqlds.DriverSettings
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 ¶
CreateData will create a "table" (csv file) in the data folder that can be queried with SQL
func CreateMockTable ¶
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 ¶
func (h *SQLCSVMock) Connect(_ context.Context, _ backend.DataSourceInstanceSettings, msg json.RawMessage) (*sql.DB, error)
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
Click to show internal directories.
Click to hide internal directories.