abstract class Type (View source)

Cluster object is used to create Sessions.

Methods

static Type
ascii()

Get representation of ascii type

static Type
bigint()

Get representation of bigint type

static Type
smallint()

Get representation of smallint type

static Type
tinyint()

Get representation of tinyint type

static Type
blob()

Get representation of blob type

static Type
boolean()

Get representation of boolean type

static Type
counter()

Get representation of counter type

static Type
decimal()

Get representation of decimal type

static Type
double()

Get representation of double type

static Type
duration()

Get representation of duration type

static Type
float()

Get representation of float type

static Type
int()

Get representation of int type

static Type
text()

Get representation of text type

static Type
timestamp()

Get representation of timestamp type

static Type
date()

Get representation of date type

static Type
time()

Get representation of time type

static Type
uuid()

Get representation of uuid type

static Type
varchar()

Get representation of varchar type

static Type
varint()

Get representation of varint type

static Type
timeuuid()

Get representation of timeuuid type

static Type
inet()

Get representation of inet type

static Type
collection(Type $type)

Initialize a Collection type


<?php
use Type;

static Type
set(Type $type)

Initialize a set type


<?php
use Type;

static Type
map(Type $keyType, Type $valueType)

Initialize a map type


use Type;

static Type
tuple(Type $types)

Initialize a tuple type


use Type;

static Type
userType(Type $types)

Initialize a user type


use Type;

string
name()

Returns the name of this type as string.

string
__toString()

Returns string representation of this type.

Details

final static Type ascii()

Get representation of ascii type

Return Value

Type

ascii type

final static Type bigint()

Get representation of bigint type

Return Value

Type

bigint type

final static Type smallint()

Get representation of smallint type

Return Value

Type

smallint type

final static Type tinyint()

Get representation of tinyint type

Return Value

Type

tinyint type

final static Type blob()

Get representation of blob type

Return Value

Type

blob type

final static Type boolean()

Get representation of boolean type

Return Value

Type

boolean type

final static Type counter()

Get representation of counter type

Return Value

Type

counter type

final static Type decimal()

Get representation of decimal type

Return Value

Type

decimal type

final static Type double()

Get representation of double type

Return Value

Type

double type

final static Type duration()

Get representation of duration type

Return Value

Type

duration type

final static Type float()

Get representation of float type

Return Value

Type

float type

final static Type int()

Get representation of int type

Return Value

Type

int type

final static Type text()

Get representation of text type

Return Value

Type

text type

final static Type timestamp()

Get representation of timestamp type

Return Value

Type

timestamp type

final static Type date()

Get representation of date type

Return Value

Type

date type

final static Type time()

Get representation of time type

Return Value

Type

time type

final static Type uuid()

Get representation of uuid type

Return Value

Type

uuid type

final static Type varchar()

Get representation of varchar type

Return Value

Type

varchar type

final static Type varint()

Get representation of varint type

Return Value

Type

varint type

final static Type timeuuid()

Get representation of timeuuid type

Return Value

Type

timeuuid type

final static Type inet()

Get representation of inet type

Return Value

Type

inet type

final static Type collection(Type $type)

Initialize a Collection type


<?php
use Type;

$collection = Type::collection(Type::int()) ->create(1, 2, 3, 4, 5, 6, 7, 8, 9);

var_dump($collection);

Parameters

Type $type

The type of values

Return Value

Type

The collection type

final static Type set(Type $type)

Initialize a set type


<?php
use Type;

$set = Type::set(Type::varchar()) ->create("a", "b", "c", "d", "e", "f", "g", "h", "i", "j");

var_dump($set);

Parameters

Type $type

The types of values

Return Value

Type

The set type

final static Type map(Type $keyType, Type $valueType)

Initialize a map type


use Type;

$map = Type::map(Type::int(), Type::varchar()) ->create(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f")

var_dump($map);```

Parameters

Type $keyType

The type of keys

Type $valueType

The type of values

Return Value

Type

The map type

final static Type tuple(Type $types)

Initialize a tuple type


use Type;

$tuple = Type::tuple(Type::varchar(), Type::int()) ->create("a", 123);

var_dump($tuple);```

Parameters

Type $types

A variadic list of types

Return Value

Type

The tuple type

final static Type userType(Type $types)

Initialize a user type


use Type;

$userType = Type::userType("a", Type::varchar(), "b", Type::int()) ->create("a", "abc", "b", 123);

var_dump($userType);```

Parameters

Type $types

A variadic list of name/type pairs

Return Value

Type

The user type

abstract string name()

Returns the name of this type as string.

Return Value

string

Name of this type

abstract string __toString()

Returns string representation of this type.

Return Value

string

String representation of this type