Documentation ¶
Index ¶
- type Option
- type SchemaSource
- type SpannerColumn
- type SpannerIndex
- type SpannerIndexColumn
- type SpannerTable
- type TypeLoader
- func (tl *TypeLoader) LoadColumns(typeTpl *models.Type) error
- func (tl *TypeLoader) LoadIndexColumns(ixTpl *models.Index) error
- func (tl *TypeLoader) LoadIndexes(tableMap map[string]*models.Type) (map[string]*models.Index, error)
- func (tl *TypeLoader) LoadSchema() (*models.Schema, error)
- func (tl *TypeLoader) LoadTable() (map[string]*models.Type, error)
- func (tl *TypeLoader) LoadTableIndexes(typeTpl *models.Type, ixMap map[string]*models.Index) error
- func (tl *TypeLoader) Mask() string
- func (tl *TypeLoader) NthParam(i int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SchemaSource ¶
type SchemaSource interface { TableList() ([]*SpannerTable, error) ColumnList(string) ([]*SpannerColumn, error) IndexList(string) ([]*SpannerIndex, error) IndexColumnList(string, string) ([]*SpannerIndexColumn, error) }
func NewInformationSchemaSource ¶
func NewInformationSchemaSource(client *spanner.Client) (SchemaSource, error)
func NewSchemaParserSource ¶
func NewSchemaParserSource(fpath string) (SchemaSource, error)
type SpannerColumn ¶
type SpannerColumn struct { FieldOrdinal int // field_ordinal ColumnName string // column_name DataType string // data_type NotNull bool // not_null IsPrimaryKey bool // is_primary_key IsGenerated bool // is_generated IsHidden bool // is_hidden }
SpannerColumn represents column info.
type SpannerIndex ¶
type SpannerIndex struct { IndexName string // index name IsUnique bool // the index is unique ro not IsPrimary bool // the index is primary key or not }
SpannerIndex represents an index.
type SpannerIndexColumn ¶
type SpannerIndexColumn struct { SeqNo int // seq_no. If is'a Storing Column, this value is 0. ColumnName string // column_name Storing bool // storing column or not }
SpannerIndexColumn represents index column info.
type SpannerTable ¶
SpannerTable represents table info.
type TypeLoader ¶
type TypeLoader struct {
// contains filtered or unexported fields
}
TypeLoader provides a common Loader implementation used by the built in schema/query loaders.
func NewTypeLoader ¶
func NewTypeLoader(source SchemaSource, inflector internal.Inflector, opt Option) *TypeLoader
func (*TypeLoader) LoadColumns ¶
func (tl *TypeLoader) LoadColumns(typeTpl *models.Type) error
LoadColumns loads schema table/view columns.
func (*TypeLoader) LoadIndexColumns ¶
func (tl *TypeLoader) LoadIndexColumns(ixTpl *models.Index) error
LoadIndexColumns loads the index column information.
func (*TypeLoader) LoadIndexes ¶
func (tl *TypeLoader) LoadIndexes(tableMap map[string]*models.Type) (map[string]*models.Index, error)
LoadIndexes loads schema index definitions.
func (*TypeLoader) LoadSchema ¶
func (tl *TypeLoader) LoadSchema() (*models.Schema, error)
LoadSchema loads schema definitions.
func (*TypeLoader) LoadTable ¶
func (tl *TypeLoader) LoadTable() (map[string]*models.Type, error)
LoadTable loads a schema table/view definition.
func (*TypeLoader) LoadTableIndexes ¶
LoadTableIndexes loads schema index definitions per table.
func (*TypeLoader) NthParam ¶
func (tl *TypeLoader) NthParam(i int) string
NthParam satisifies Loader's NthParam.
Click to show internal directories.
Click to hide internal directories.