Documentation
¶
Index ¶
- Variables
- func ConvertData(conv *internal.Conv, srcTable string, srcCols []string, srcSchema schema.Table, ...) (string, []string, []interface{}, error)
- func ProcessDataRow(conv *internal.Conv, srcTable string, srcCols []string, srcSchema schema.Table, ...)
- func ProcessMySQLDump(conv *internal.Conv, r *internal.Reader) error
Constants ¶
This section is empty.
Variables ¶
var MysqlSpatialDataTypes = []string{"geometrycollection", "multipoint", "multilinestring", "multipolygon", "point", "linestring", "polygon", "geometry"}
MysqlSpatialDataTypes is an array of all MySQL spatial data types.
Functions ¶
func ConvertData ¶
func ConvertData(conv *internal.Conv, srcTable string, srcCols []string, srcSchema schema.Table, spTable string, spCols []string, spSchema ddl.CreateTable, vals []string) (string, []string, []interface{}, error)
ConvertData maps the source DB data in vals into Spanner data, based on the Spanner and source DB schemas. Note that since entries in vals may be empty, we also return the list of columns (empty cols are dropped).
func ProcessDataRow ¶
func ProcessDataRow(conv *internal.Conv, srcTable string, srcCols []string, srcSchema schema.Table, spTable string, spCols []string, spSchema ddl.CreateTable, vals []string)
ProcessDataRow converts a row of data and writes it out to Spanner. srcTable and srcCols are the source table and columns respectively, and vals contains string data to be converted to appropriate types to send to Spanner. ProcessDataRow is only called in DataMode.
func ProcessMySQLDump ¶
ProcessMySQLDump reads mysqldump data from r and does schema or data conversion, depending on whether conv is configured for schema mode or data mode. In schema mode, ProcessMySQLDump incrementally builds a schema (updating conv). In data mode, ProcessMySQLDump uses this schema to convert MySQL data and writes it to Spanner, using the data sink specified in conv.
Types ¶
This section is empty.