table

package
v1.0.1-0...-386defc Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotNullAdded   string = "ADDED"
	NotNullRemoved string = "REMOVED"
)

Variables

This section is empty.

Functions

func AddNewColumn

func AddNewColumn(w http.ResponseWriter, r *http.Request)

func GetSpannerTableDDL

func GetSpannerTableDDL(spannerTable ddl.CreateTable, spDialect string, driver string) string

GetSpannerTableDDL return Spanner Table DDL as string.

func IsColumnPresentInColNames

func IsColumnPresentInColNames(colIds []string, colId string) bool

IsColumnPresentInColNames check column is present in colnames.

func RemoveColumn

func RemoveColumn(tableId string, colId string, conv *internal.Conv)

removeColumn remove given column from schema.

func ReviewTableSchema

func ReviewTableSchema(w http.ResponseWriter, r *http.Request)

ReviewTableSchema review Spanner Table Schema.

func UpdateColumnSize

func UpdateColumnSize(newSize, tableId, colId string, conv *internal.Conv)

func UpdateColumnSizeChangeTableSchema

func UpdateColumnSizeChangeTableSchema(conv *internal.Conv, tableId string, colId string, newSize string)

UpdateColumnSizeTableSchema updates column size to newSize for a column of a table.

func UpdateColumnType

func UpdateColumnType(newType, tableId, colId string, conv *internal.Conv, w http.ResponseWriter)

UpdateColumnType updates type of given column to newType.

func UpdateColumnTypeChangeTableSchema

func UpdateColumnTypeChangeTableSchema(conv *internal.Conv, tableId string, colId string, newType string, w http.ResponseWriter) error

UpdateColumnTypeTableSchema updates column type to newtype for a column of a table.

func UpdateNotNull

func UpdateNotNull(notNullChange, tableId, colId string, conv *internal.Conv)

func UpdateTableSchema

func UpdateTableSchema(w http.ResponseWriter, r *http.Request)

updateTableSchema updates the Spanner schema. Following actions can be performed on a specified table: (1) Add column. (2) Remove column. (3) Rename column. (4) Add or Remove NotNull constraint. (5) Update Spanner type.

Types

type InterleaveColumn

type InterleaveColumn struct {
	ColumnName       string
	Type             string
	Size             int
	UpdateColumnName string
	UpdateType       string
	UpdateSize       int
	ColumnId         string
}

type InterleaveTableSchema

type InterleaveTableSchema struct {
	Table                   string
	InterleaveColumnChanges []InterleaveColumn
}

func ReviewColumnSize

func ReviewColumnSize(colSize int64, tableId, colId string, conv *internal.Conv, interleaveTableSchema []InterleaveTableSchema) []InterleaveTableSchema

func ReviewColumnType

func ReviewColumnType(newType, tableId, colId string, conv *internal.Conv, interleaveTableSchema []InterleaveTableSchema, w http.ResponseWriter) (_ []InterleaveTableSchema, err error)

ReviewColumnNameType review update of colum type to given newType.

type ReviewTableSchemaResponse

type ReviewTableSchemaResponse struct {
	DDL     string
	Changes []InterleaveTableSchema
}

Jump to

Keyboard shortcuts

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