Documentation ¶
Index ¶
- type InfoSchemaImpl
- func (isi InfoSchemaImpl) GetColumns(conv *internal.Conv, table common.SchemaAndName, ...) (map[string]schema.Column, []string, error)
- func (isi InfoSchemaImpl) GetConstraints(conv *internal.Conv, table common.SchemaAndName) ([]string, map[string][]string, error)
- func (isi InfoSchemaImpl) GetForeignKeys(conv *internal.Conv, table common.SchemaAndName) (foreignKeys []schema.ForeignKey, err error)
- func (isi InfoSchemaImpl) GetIndexes(conv *internal.Conv, table common.SchemaAndName, ...) ([]schema.Index, error)
- func (isi InfoSchemaImpl) GetInterleaveTables() (map[string]string, error)
- func (isi InfoSchemaImpl) GetRowCount(table common.SchemaAndName) (int64, error)
- func (isi InfoSchemaImpl) GetRowsFromTable(conv *internal.Conv, srcTable string) (interface{}, error)
- func (isi InfoSchemaImpl) GetTableName(schema string, tableName string) string
- func (isi InfoSchemaImpl) GetTables() ([]common.SchemaAndName, error)
- func (isi InfoSchemaImpl) GetToDdl() common.ToDdl
- func (isi InfoSchemaImpl) ProcessData(conv *internal.Conv, tableId string, srcSchema schema.Table, spCols []string, ...) error
- func (isi InfoSchemaImpl) StartChangeDataCapture(ctx context.Context, conv *internal.Conv) (map[string]interface{}, error)
- func (isi InfoSchemaImpl) StartStreamingMigration(ctx context.Context, client *spanner.Client, conv *internal.Conv, ...) error
- type ToDdlImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoSchemaImpl ¶
InfoSchemaImpl postgres specific implementation for InfoSchema.
func (InfoSchemaImpl) GetColumns ¶
func (isi InfoSchemaImpl) GetColumns(conv *internal.Conv, table common.SchemaAndName, constraints map[string][]string, primaryKeys []string) (map[string]schema.Column, []string, error)
GetColumns returns a list of Column objects and names
func (InfoSchemaImpl) GetConstraints ¶
func (isi InfoSchemaImpl) GetConstraints(conv *internal.Conv, table common.SchemaAndName) ([]string, map[string][]string, error)
GetConstraints returns a list of primary keys and by-column map of other constraints. Note: we need to preserve ordinal order of columns in primary key constraints. Note that foreign key constraints are handled in getForeignKeys.
func (InfoSchemaImpl) GetForeignKeys ¶
func (isi InfoSchemaImpl) GetForeignKeys(conv *internal.Conv, table common.SchemaAndName) (foreignKeys []schema.ForeignKey, err error)
GetForeignKeys returns a list of all the foreign key constraints.
func (InfoSchemaImpl) GetIndexes ¶
func (isi InfoSchemaImpl) GetIndexes(conv *internal.Conv, table common.SchemaAndName, colNameIdMap map[string]string) ([]schema.Index, error)
GetIndexes returns a list of Indexes per table.
func (InfoSchemaImpl) GetInterleaveTables ¶
func (isi InfoSchemaImpl) GetInterleaveTables() (map[string]string, error)
func (InfoSchemaImpl) GetRowCount ¶
func (isi InfoSchemaImpl) GetRowCount(table common.SchemaAndName) (int64, error)
GetRowCount returns the row count of the table.
func (InfoSchemaImpl) GetRowsFromTable ¶
func (isi InfoSchemaImpl) GetRowsFromTable(conv *internal.Conv, srcTable string) (interface{}, error)
func (InfoSchemaImpl) GetTableName ¶
func (isi InfoSchemaImpl) GetTableName(schema string, tableName string) string
GetTableName returns table name.
func (InfoSchemaImpl) GetTables ¶
func (isi InfoSchemaImpl) GetTables() ([]common.SchemaAndName, error)
GetTables return list of tables in the selected database.
func (InfoSchemaImpl) GetToDdl ¶
func (isi InfoSchemaImpl) GetToDdl() common.ToDdl
GetToDdl function below implement the common.InfoSchema interface.
func (InfoSchemaImpl) ProcessData ¶
func (isi InfoSchemaImpl) ProcessData(conv *internal.Conv, tableId string, srcSchema schema.Table, spCols []string, spSchema ddl.CreateTable, additionalAttributes internal.AdditionalDataAttributes) error
We leave the 5 functions below empty to be able to pass this as an infoSchema interface. We don't need these for now.
func (InfoSchemaImpl) StartChangeDataCapture ¶
type ToDdlImpl ¶
type ToDdlImpl struct { }
func (ToDdlImpl) ToSpannerType ¶
func (tdi ToDdlImpl) ToSpannerType(conv *internal.Conv, spType string, srcType schema.Type) (ddl.Type, []internal.SchemaIssue)
ToSpannerType maps a scalar source schema type (defined by id and mods) into a Spanner type. This is the core source-to-Spanner type mapping. toSpannerType returns the Spanner type and a list of type conversion issues encountered. Functions below implement the common.ToDdl interface