PHP Class Cassandra\SchemaMetadataIntegrationTest

Inheritance: extends BasicIntegrationTest
Show file Open project: datastax/php-driver

Public Methods

Method Description
setUp ( ) Setup the schema metadata for the schema metadata tests.
testBasicSchemaMetadata ( ) Schema metadata support is available; basic test.
testClusteringKeyMaterializedViews ( ) Schema metadata to validate a materialized view exist when using a clustering key
testCollectionSecondaryIndexes ( ) Schema metadata to validate collection secondary indexes exist
testDisableSchemaMetadata ( ) Schema metadata support can be disabled.
testDropMaterializedViews ( ) Schema metadata to validate materialized views are dropped correctly
testDropUserDefinedAggregates ( ) Schema metadata to validate UDAs are dropped correctly
testDropUserDefinedFunctions ( ) Schema metadata to validate UDFs are dropped correctly
testEnumerateKeyspaces ( ) Enumerate over keyspaces in schema metadata.
testEnumerateTablesAndColumns ( ) Enumerate over tables and columns in schema metadata.
testGetColumnIndexOptions ( ) Get index options metadata from a column
testGetKeyspaceByName ( ) Get keyspace from schema metadata using keyspace name.
testGetTableAndColumnByName ( ) Get tables and columns from schema metadata using their names.
testIteratorMaterializedViews ( ) Schema metadata to validate materialized views exist using iterator
testIteratorSecondaryIndexes ( ) Schema metadata to validate secondary indexes exist using iterator
testIteratorUserDefinedAggregates ( ) Schema metadata to validate UDAs exist using iterator
testIteratorUserDefinedFunctions ( ) Schema metadata to validate UDFs exist using iterator
testMaterializedViews ( ) Schema metadata to validate a simple materialized view exist
testNoMaterializedViews ( ) Schema metadata to validate no materialized views exist
testNoSecondaryIndexes ( ) Schema metadata to validate no secondary indexes exist
testNoUserDefinedAggregates ( ) Schema metadata to validate no UDAs exist
testNoUserDefinedFunctions ( ) Schema metadata to validate no UDFs exist
testPrimaryKeyMaterializedViews ( ) Schema metadata to validate a materialized view exist when using a primary key
testSchemaMetadataWithNestedColumnTypes ( ) Schema metadata data with deeply nested collection.
testSchemaMetadataWithNullFields ( ) Schema metadata data with null fields.
testSecondaryIndexes ( ) Schema metadata to validate secondary indexes exist
testUserDefinedAggregates ( ) Schema metadata to validate a UDA exist
testUserDefinedFunctions ( ) Schema metadata to validate a UDF exist
testVersion ( ) Schema metadata versioning

Protected Methods

Method Description
assertAggregateUserDefinedFunction ( ) Assert the uda_udf_final function
assertIndex ( $index, $kind, $target, $className, $isCustom ) Assert the index instance
assertMaterializedView ( $materializedView, $name, $tableName, $columns, $partitionKeyColumns, $clusteringKeyColumns ) Assert the materialized view (not all elements)
assertMaterializedViewsEqual ( $materializedViewOne, $materializedViewTwo ) Assert the materialized views are equal
assertUserDefinedAggregate ( ) Assert the user_defined_aggregate aggregate
assertUserDefinedFunction ( ) Assert the user_defined_function function
assertUserDefinedFunctionsEqual ( $name, $function ) Assert the UDFs are equal
createClusteringKeyMaterializedView ( ) Create the primary key materialized view using the second table
createCollectionSecondaryIndex ( ) Create the collections secondary index using the table
createKeyspace ( $keyspaceName, $replicationFactor = 1 )
createKeyspaceWithSchema ( $keyspaceName, $tableSchemas )
createPrimaryKeyMaterializedView ( ) Create the primary key materialized view using the second table
createSimpleMaterializedView ( ) Create the simple materialized view using the first table
createSimpleSecondaryIndex ( ) Create the simple secondary index using the table
createTableForSecondaryIndexes ( ) Create the table for the secondary indexes
createTablesForMaterializedViews ( ) Create the tables for the materialized views
createUserDefinedAggregate ( ) Create the user defined aggregate and two user defined functions for the associated aggregate
createUserDefinedFunction ( ) Create the user defined function
generateKeyspaceName ( $prefix )

Method Details

assertAggregateUserDefinedFunction() protected method

Assert the uda_udf_final function

assertIndex() protected method

Assert the index instance
protected assertIndex ( $index, $kind, $target, $className, $isCustom )
$index Index to assert against
$kind Kind to assert
$target Target (and index->option('target')) to assert for index->target()
$className Boolean or string value to assert for index->className
$isCustom Value of index->isCustom() to assert

assertMaterializedView() protected method

Assert the materialized view (not all elements)
protected assertMaterializedView ( $materializedView, $name, $tableName, $columns, $partitionKeyColumns, $clusteringKeyColumns )
$materializedView Materialized view to validate
$name Name to assert
$tableName Table name to assert
$columns Columns names to assert
$partitionKeyColumns Primary key column names to assert
$clusteringKeyColumns Cluster key column names to assert

assertMaterializedViewsEqual() protected method

Assert the materialized views are equal
protected assertMaterializedViewsEqual ( $materializedViewOne, $materializedViewTwo )
$materializedViewOne First materialized view
$materializedViewTwo Second materialized view

assertUserDefinedAggregate() protected method

Assert the user_defined_aggregate aggregate

assertUserDefinedFunction() protected method

Assert the user_defined_function function

assertUserDefinedFunctionsEqual() protected method

Assert the UDFs are equal
protected assertUserDefinedFunctionsEqual ( $name, $function )
$name Name of user defined function to look up and compare
$function User defined function to compare

createClusteringKeyMaterializedView() protected method

Create the primary key materialized view using the second table

createCollectionSecondaryIndex() protected method

Create the collections secondary index using the table

createKeyspace() protected method

protected createKeyspace ( $keyspaceName, $replicationFactor = 1 )

createKeyspaceWithSchema() protected method

protected createKeyspaceWithSchema ( $keyspaceName, $tableSchemas )

createPrimaryKeyMaterializedView() protected method

Create the primary key materialized view using the second table

createSimpleMaterializedView() protected method

Create the simple materialized view using the first table

createSimpleSecondaryIndex() protected method

Create the simple secondary index using the table

createTableForSecondaryIndexes() protected method

Create the table for the secondary indexes

createTablesForMaterializedViews() protected method

Create the tables for the materialized views

createUserDefinedAggregate() protected method

Create the user defined aggregate and two user defined functions for the associated aggregate

createUserDefinedFunction() protected method

Create the user defined function

generateKeyspaceName() protected static method

protected static generateKeyspaceName ( $prefix )

setUp() public method

Setup the schema metadata for the schema metadata tests.
public setUp ( )

testBasicSchemaMetadata() public method

This test will ensure that the PHP driver supports schema metadata.

testClusteringKeyMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.

testCollectionSecondaryIndexes() public method

This test ensures that secondary indexes are properly handled by the driver.

testDisableSchemaMetadata() public method

This test will ensure that the PHP driver supports the ability to enable and disable the schema metadata when creating a session object.

testDropMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.

testDropUserDefinedAggregates() public method

This test ensures that UDAs are properly handled by the driver.

testDropUserDefinedFunctions() public method

This test ensures that UDFs are properly handled by the driver.

testEnumerateKeyspaces() public method

This test ensures that driver correctly enumerates over keyspace metadata.

testEnumerateTablesAndColumns() public method

This test ensures that driver correctly enumerates over table and column metadata.

testGetColumnIndexOptions() public method

This test ensures that index options metadata are properly returned from an indexed column.

testGetKeyspaceByName() public method

This test ensures that the driver is able to access keyspace metadata by name.

testGetTableAndColumnByName() public method

This test ensures that the driver is able to access table and column metadata by name.

testIteratorMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.

testIteratorSecondaryIndexes() public method

This test ensures that secondary indexes are properly handled by the driver.

testIteratorUserDefinedAggregates() public method

This test ensures that UDAs are properly handled by the driver.

testIteratorUserDefinedFunctions() public method

This test ensures that UDFs are properly handled by the driver.

testMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.

testNoMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.

testNoSecondaryIndexes() public method

This test ensures that secondary indexes are properly handled by the driver.

testNoUserDefinedAggregates() public method

This test ensures that UDAs are properly handled by the driver.

testNoUserDefinedFunctions() public method

This test ensures that UDFs are properly handled by the driver.

testPrimaryKeyMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.

testSchemaMetadataWithNestedColumnTypes() public method

This test ensures that the validator parser correctly parses and builds columns with deeply nested collection types.

testSchemaMetadataWithNullFields() public method

This test ensures that table and column metadata with null fields are returned correctly.

testSecondaryIndexes() public method

This test ensures that secondary indexes are properly handled by the driver.

testUserDefinedAggregates() public method

This test ensures that UDAs are properly handled by the driver.

testUserDefinedFunctions() public method

This test ensures that UDFs are properly handled by the driver.

testVersion() public method

This test ensures that schema metadata has a version identifier to quickly determine if one schema is different than another.
public testVersion ( )