Documentation
¶
Index ¶
- func CanRename(names []string, table string) (bool, error)
- func CheckSpannerNamesValidity(input []string) (bool, []string)
- func Difference(listone, listtwo []string) []string
- func DuplicateInArray(element []int) int
- func GetColIdFromSpannerName(conv *internal.Conv, tableId, colName string) (string, error)
- func GetFilePrefix(now time.Time) (string, error)
- func GetInterleavedFk(conv *internal.Conv, tableId string, srcColId string) (schema.ForeignKey, error)
- func GetPrimaryKeyIndexFromOrder(pk []ddl.IndexKey, order int) int
- func GetRefColIndexFromFk(fk ddl.Foreignkey, colId string) int
- func GetSpannerUri(projectId string, instanceId string) string
- func GetType(conv *internal.Conv, newType, tableId, colId string) (ddl.CreateTable, ddl.Type, error)
- func InitObjectId()
- func IsColumnPresent(columns []string, col string) int
- func IsParent(tableId string) (bool, string)
- func IsPartOfFK(col, table string) bool
- func IsPartOfPK(col, table string) bool
- func IsPartOfSecondaryIndex(col, table string) (bool, string)
- func IsReferencedByFK(col, table string) (bool, string)
- func IsSchemaIssuePresent(schemaissue []internal.SchemaIssue, issue internal.SchemaIssue) bool
- func IsTypeChanged(newType, tableId, colId string, conv *internal.Conv) (bool, error)
- func Remove(slice []string, s int) []string
- func RemoveColumnFromSecondaryIndexKey(slice []ddl.IndexKey, s int) []ddl.IndexKey
- func RemoveFk(slice []ddl.Foreignkey, fkId string, srcSchema schema.Table, tableId string) ([]ddl.Foreignkey, error)
- func RemoveFkColumn(slice []string, s int) []string
- func RemoveFkReferColumns(slice []string, s int) []string
- func RemoveIndex(PrimaryKeys []ddl.IndexKey, index int) []ddl.IndexKey
- func RemovePk(slice []ddl.IndexKey, s int) []ddl.IndexKey
- func RemoveSchemaIssue(schemaissue []internal.SchemaIssue, issue internal.SchemaIssue) []internal.SchemaIssue
- func RemoveSchemaIssueOnlyOnce(schemaissue []internal.SchemaIssue, issue internal.SchemaIssue) []internal.SchemaIssue
- func RemoveSchemaIssues(schemaissue []internal.SchemaIssue) []internal.SchemaIssue
- func RemoveSecondaryIndex(slice []ddl.CreateIndex, s int) []ddl.CreateIndex
- func UpdateDataType(conv *internal.Conv, newType, tableId, colId string) error
- func UpdateMaxColumnLen(conv *internal.Conv, dataType, tableId, colId string, spColLen int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
Difference gives list of element that are only present in first list.
func DuplicateInArray ¶
DuplicateInArray checks if there is any duplicate element present in the list.
func GetColIdFromSpannerName ¶
func GetInterleavedFk ¶
func GetRefColIndexFromFk ¶
func GetRefColIndexFromFk(fk ddl.Foreignkey, colId string) int
func GetSpannerUri ¶
func InitObjectId ¶
func InitObjectId()
func IsColumnPresent ¶
IsColumnPresent check string is present in given list.
func IsPartOfFK ¶
func IsPartOfPK ¶
func IsPartOfSecondaryIndex ¶
func IsReferencedByFK ¶
func IsSchemaIssuePresent ¶
func IsSchemaIssuePresent(schemaissue []internal.SchemaIssue, issue internal.SchemaIssue) bool
IsSchemaIssuePresent checks if issue is present in the given schemaissue list.
func IsTypeChanged ¶
func RemoveColumnFromSecondaryIndexKey ¶
RemoveColumnFromSecondaryIndexKey remove given column from SpannerSecondary Index Key List.
func RemoveFk ¶
func RemoveFk(slice []ddl.Foreignkey, fkId string, srcSchema schema.Table, tableId string) ([]ddl.Foreignkey, error)
func RemoveFkColumn ¶
RemoveFkColumn remove given column from Spanner Foreignkey Columns List.
func RemoveFkReferColumns ¶
removeFkReferColumns remove given column from Spanner FkReferColumns Columns List.
func RemoveIndex ¶
RemoveIndex removes Primary Key from the given Primary Key list.
func RemoveSchemaIssue ¶
func RemoveSchemaIssue(schemaissue []internal.SchemaIssue, issue internal.SchemaIssue) []internal.SchemaIssue
RemoveSchemaIssue removes issue from the given list.
func RemoveSchemaIssueOnlyOnce ¶
func RemoveSchemaIssueOnlyOnce(schemaissue []internal.SchemaIssue, issue internal.SchemaIssue) []internal.SchemaIssue
Removes only the first occurance of SchemaIssue from given list
func RemoveSchemaIssues ¶
func RemoveSchemaIssues(schemaissue []internal.SchemaIssue) []internal.SchemaIssue
RemoveSchemaIssues remove all hotspot and interleaved from given list. RemoveSchemaIssues is used when we are adding or removing primary key column from primary key.
func RemoveSecondaryIndex ¶
func RemoveSecondaryIndex(slice []ddl.CreateIndex, s int) []ddl.CreateIndex
func UpdateDataType ¶
Types ¶
This section is empty.