loaders

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpanIndexColumns

func SpanIndexColumns(client *spanner.Client, table string, index string) ([]*models.IndexColumn, error)

SpanIndexColumns runs a custom query, returning results as IndexColumn.

func SpanParseType

func SpanParseType(dt string, nullable bool) (int, string, string)

SpanParseType parse a mysql type into a Go type based on the column definition.

func SpanTableColumns

func SpanTableColumns(client *spanner.Client, table string) ([]*models.Column, error)

SpanTableColumns parses the query and generates a type for it.

func SpanTableIndexes

func SpanTableIndexes(client *spanner.Client, table string) ([]*models.Index, error)

func SpanValidateCustomType

func SpanValidateCustomType(dataType string, customType string) bool

func SpanView

func SpanView(client *spanner.Client, viewName string) (*models.TableView, error)

Types

type SpannerLoader

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

func NewSpannerLoader

func NewSpannerLoader(client *spanner.Client) *SpannerLoader

func (*SpannerLoader) ColumnList

func (s *SpannerLoader) ColumnList(table string) ([]*models.Column, error)

func (*SpannerLoader) IndexColumnList

func (s *SpannerLoader) IndexColumnList(table string, index string) ([]*models.IndexColumn, error)

func (*SpannerLoader) IndexList

func (s *SpannerLoader) IndexList(table string) ([]*models.Index, error)

func (*SpannerLoader) MaskFunc

func (s *SpannerLoader) MaskFunc() string

func (*SpannerLoader) ParamN

func (s *SpannerLoader) ParamN(n int) string

func (*SpannerLoader) ParseType

func (s *SpannerLoader) ParseType(dt string, nullable bool) (int, string, string)

func (*SpannerLoader) TableList

func (s *SpannerLoader) TableList() ([]*models.Table, error)

func (*SpannerLoader) ValidCustomType

func (s *SpannerLoader) ValidCustomType(dataType string, customType string) bool

type SpannerLoaderFromDDL

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

func NewSpannerLoaderFromDDL

func NewSpannerLoaderFromDDL(fpath string) (*SpannerLoaderFromDDL, error)

func (*SpannerLoaderFromDDL) ColumnList

func (s *SpannerLoaderFromDDL) ColumnList(name string) ([]*models.Column, error)

func (*SpannerLoaderFromDDL) IndexColumnList

func (s *SpannerLoaderFromDDL) IndexColumnList(table, index string) ([]*models.IndexColumn, error)

func (*SpannerLoaderFromDDL) IndexList

func (s *SpannerLoaderFromDDL) IndexList(name string) ([]*models.Index, error)

func (*SpannerLoaderFromDDL) MaskFunc

func (s *SpannerLoaderFromDDL) MaskFunc() string

func (*SpannerLoaderFromDDL) ParamN

func (s *SpannerLoaderFromDDL) ParamN(n int) string

func (*SpannerLoaderFromDDL) ParseType

func (s *SpannerLoaderFromDDL) ParseType(dt string, nullable bool) (int, string, string)

func (*SpannerLoaderFromDDL) TableList

func (s *SpannerLoaderFromDDL) TableList() ([]*models.Table, error)

func (*SpannerLoaderFromDDL) ValidCustomType

func (s *SpannerLoaderFromDDL) ValidCustomType(dataType string, customType string) bool

Jump to

Keyboard shortcuts

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