ddl

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColumnTypes = []string{
	"{ basic: TEXT }",
	"{ basic: ASCII }",
	"{ basic: VARCHAR }",
	"{ basic: TEXT }",
	"{ basic: BOOLEAN }",
	"{ basic: FLOAT }",
	"{ basic: DOUBLE }",
	"{ basic: TINYINT }",

	"{ basic: INT }",
	"{ basic: BIGINT }",
	"{ basic: VARINT }",
	"{ basic: DECIMAL }",
	"{ basic: UUID }",
	"{ basic: TIMEUUID }",
	"{ basic: TIME }",

	"{ basic: TIMESTAMP }",
	"{ basic: BLOB }",
	"{ basic: INET }",
	"{ basic: LIST, info: { subTypes: [ { basic: TEXT } ] } }",
	"{ basic: SET, info: { subTypes: [ { basic: TEXT } ] } }",
	"{ basic: MAP, info: { subTypes: [ { basic: TEXT }, { basic: INT } ] } }",
}
View Source
var ColumnTypesResult = []map[string]interface{}{
	{"basic": "TEXT"},
	{"basic": "ASCII"},
	{"basic": "TEXT"},
	{"basic": "TEXT"},
	{"basic": "BOOLEAN"},
	{"basic": "FLOAT"},
	{"basic": "DOUBLE"},
	{"basic": "TINYINT"},

	{"basic": "INT"},
	{"basic": "BIGINT"},
	{"basic": "VARINT"},
	{"basic": "DECIMAL"},
	{"basic": "UUID"},
	{"basic": "TIMEUUID"},
	{"basic": "TIME"},

	{"basic": "TIMESTAMP"},
	{"basic": "BLOB"},
	{"basic": "INET"},
	{"basic": "LIST", "info": map[string]interface{}{"subTypes": []interface{}{map[string]interface{}{"basic": "TEXT"}}}},
	{"basic": "SET", "info": map[string]interface{}{"subTypes": []interface{}{map[string]interface{}{"basic": "TEXT"}}}},
	{"basic": "MAP", "info": map[string]interface{}{"subTypes": []interface{}{map[string]interface{}{"basic": "TEXT"}, map[string]interface{}{"basic": "INT"}}}},
}
View Source
var DCsResult = []interface{}{
	map[string]interface{}{
		"name":     "dc1",
		"replicas": float64(3),
	},
}

Functions

func AlterTableAdd

func AlterTableAdd(routes []graphql.Route, ksName string, tableName string, columnTypes []string)

func AlterTableAddResponse

func AlterTableAddResponse(routes []graphql.Route, ksName string,
	tableName string, columnTypes []string) schemas.ResponseBody

func AlterTableDrop

func AlterTableDrop(routes []graphql.Route, ksName string, tableName string, columns []string)

func AlterTableDropResponse

func AlterTableDropResponse(routes []graphql.Route, ksName string, tableName string, columns []string) schemas.ResponseBody

func BuildColumnResult

func BuildColumnResult(columnName string, columnTypes []map[string]interface{}, columns ...map[string]interface{}) []interface{}

func CreateKeyspace

func CreateKeyspace(routes []graphql.Route, name string)

func CreateKeyspaceIfNotExists

func CreateKeyspaceIfNotExists(routes []graphql.Route, name string, ifNotExists bool) schemas.ResponseBody

func CreateTable

func CreateTable(routes []graphql.Route, ksName string, tableName string, columnTypes []string)

func CreateTableIfNotExists

func CreateTableIfNotExists(routes []graphql.Route, ksName string, tableName string,
	columnTypes []string, ifNotExists bool) schemas.ResponseBody

func DropKeyspace

func DropKeyspace(routes []graphql.Route, name string)

func DropTable

func DropTable(routes []graphql.Route, ksName string, tableName string)

func DropTableResponse

func DropTableResponse(routes []graphql.Route, ksName string, tableName string) schemas.ResponseBody

func ExpectInvalidKeyspace

func ExpectInvalidKeyspace(routes []graphql.Route, ksName string, tableName string)

func Keyspace

func Keyspace(routes []graphql.Route, ksName string) schemas.ResponseBody

func Keyspaces

func Keyspaces(routes []graphql.Route) schemas.ResponseBody

func SortColumns

func SortColumns(response schemas.ResponseBody)

func Table

func Table(routes []graphql.Route, ksName string, tableName string) schemas.ResponseBody

func Tables

func Tables(routes []graphql.Route, ksName string) schemas.ResponseBody

func TextColumn

func TextColumn(columnName string) map[string]interface{}

func WaitUntilColumnExists

func WaitUntilColumnExists(columnName string, queryFunc func() schemas.ResponseBody) schemas.ResponseBody

func WaitUntilColumnIsGone

func WaitUntilColumnIsGone(columnName string, queryFunc func() schemas.ResponseBody) schemas.ResponseBody

func WaitUntilExists

func WaitUntilExists(queryFunc func() schemas.ResponseBody) schemas.ResponseBody

func WaitUntilGone

func WaitUntilGone(queryFunc func() schemas.ResponseBody)

Types

This section is empty.

Jump to

Keyboard shortcuts

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