exaMetadata

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExaMetaDataReaderMock

type ExaMetaDataReaderMock struct {
	mock.Mock
	// contains filtered or unexported fields
}

func CreateExaMetaDataReaderMock

func CreateExaMetaDataReaderMock(extensionSchema string) *ExaMetaDataReaderMock

func (*ExaMetaDataReaderMock) GetScriptByName

func (mock *ExaMetaDataReaderMock) GetScriptByName(tx *sql.Tx, schemaName, scriptName string) (*ExaScriptRow, error)

func (*ExaMetaDataReaderMock) ReadMetadataTables

func (mock *ExaMetaDataReaderMock) ReadMetadataTables(tx *sql.Tx, schemaName string) (*ExaMetadata, error)

func (*ExaMetaDataReaderMock) SimulateExaAllScripts

func (m *ExaMetaDataReaderMock) SimulateExaAllScripts(scripts []ExaScriptRow)

func (*ExaMetaDataReaderMock) SimulateExaMetaData

func (m *ExaMetaDataReaderMock) SimulateExaMetaData(metaData ExaMetadata)

func (*ExaMetaDataReaderMock) SimulateGetScriptByName

func (m *ExaMetaDataReaderMock) SimulateGetScriptByName(scriptName string, script *ExaScriptRow)

func (*ExaMetaDataReaderMock) SimulateGetScriptByNameFails

func (m *ExaMetaDataReaderMock) SimulateGetScriptByNameFails(scriptName string, err error)

func (*ExaMetaDataReaderMock) SimulateGetScriptByNameScriptText

func (m *ExaMetaDataReaderMock) SimulateGetScriptByNameScriptText(scriptName string, scriptText string)

type ExaMetadata

type ExaMetadata struct {
	AllScripts        ExaScriptTable         `json:"allScripts"`
	AllVirtualSchemas ExaVirtualSchemasTable `json:"allVirtualSchemas"`
}

type ExaMetadataReader

type ExaMetadataReader interface {
	// ReadMetadataTables reads all metadata tables.
	ReadMetadataTables(tx *sql.Tx, schemaName string) (*ExaMetadata, error)

	// GetScriptByName gets a row from the SYS.EXA_ALL_SCRIPTS table for the given schema and script name.
	//
	// Returns `(nil, nil)` when no script exists with the given name.
	GetScriptByName(tx *sql.Tx, schemaName, scriptName string) (*ExaScriptRow, error)
}

ExaMetadataReader allows accessing the Exasol metadata tables.

func CreateExaMetaDataReader

func CreateExaMetaDataReader() ExaMetadataReader

CreateExaMetaDataReader creates a new ExaMetadataReader for the Exasol meta data schema SYS.

func CreateExaMetaDataReaderForCustomMetadataSchema added in v0.5.10

func CreateExaMetaDataReaderForCustomMetadataSchema(metaDataSchema string) ExaMetadataReader

CreateExaMetaDataReaderForCustomMetadataSchema creates a new ExaMetadataReader for the given Exasol meta data schema. This is only used for integration tests.

type ExaScriptRow

type ExaScriptRow struct {
	Schema     string `json:"schema"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	InputType  string `json:"inputType"`
	ResultType string `json:"resultType"`
	Text       string `json:"text"`
	Comment    string `json:"comment"`
}

type ExaScriptTable

type ExaScriptTable struct {
	Rows []ExaScriptRow `json:"rows"`
}

type ExaVirtualSchemaRow

type ExaVirtualSchemaRow struct {
	Name                string `json:"name"`
	Owner               string `json:"owner"`
	AdapterScriptSchema string `json:"adapterScriptSchema"`
	AdapterScriptName   string `json:"adapterScriptName"`
	AdapterNotes        string `json:"adapterNotes"`
}

type ExaVirtualSchemasTable

type ExaVirtualSchemasTable struct {
	Rows []ExaVirtualSchemaRow `json:"rows"`
}

Jump to

Keyboard shortcuts

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