Skip to content

Commit b60c452

Browse files
author
Bulat Shakirzyanov
committed
add more docs
1 parent 0e7c760 commit b60c452

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ This is a wrapper around [the DataStax C/C++ Driver for Apache Cassandra and Dat
1414
* IRC: #datastax-drivers on [irc.freenode.net](http://freenode.net>)
1515
* Twitter: Follow the latest news about DataStax Drivers - [@avalanche123](http://twitter.com/avalanche123), [@al3xandru](https://twitter.com/al3xandru)
1616

17-
## Status of v1.0.0
18-
19-
This is the first stable release of the DataStax PHP Driver.
20-
2117
## What's new in v1.0.0:
2218

2319
* [Schema Metadata API](http://datastax.github.io/php-driver/features/#schema-metadata).
20+
* [Type Metadata API](http://datastax.github.io/php-driver/features/#data-types).
2421

2522
## Feedback Requested
2623

features/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,25 @@ foreach ($schema->keyspaces() as $keyspace) {
483483

484484
**NOTE** A new instance of [`Cassandra\Schema`](http://datastax.github.io/php-driver/api/Cassandra/interface.Schema/) is returned each time [`Cassandra\Session::schema()`](http://datastax.github.io/php-driver/api/Cassandra/interface.Session/#method.schema) is called. This instance is a simple value object and its information, such as keyspaces, tables and columns will not be kept up-to-date with the state of the cluster. In order to obtain the latest schema metadata, you have to call [`Cassandra\Session::schema()`](http://datastax.github.io/php-driver/api/Cassandra/interface.Session/#method.schema) again.
485485

486+
### Data Types
487+
488+
The PHP driver for Apache Cassandra supports [a variety of datatypes](http://datastax.github.io/php-driver/features/datatypes/).
489+
490+
You can also use the rich type metadata API to define and inspect types, as well as validate data objects.
491+
492+
The example below defines and creates a [`Cassandra\Map`](http://datastax.github.io/php-driver/api/Cassandra/class.Map/) using [`Cassandra\Type`](http://datastax.github.io/php-driver/api/Cassandra/interface.Type/) interface.
493+
494+
```php
495+
<?php
496+
497+
$map = Cassandra\Type::map(Cassandra\Type::varchar(), Cassandra\Type::int())
498+
->create('a', 1, 'b', 2, 'c', 3, 'd', 4);
499+
500+
var_dump(array_combine($map->keys(), $map->values()));
501+
```
502+
503+
**NOTE** The `create()` method or various types validates and coerces provided values into the target type.
504+
486505
### Logging
487506

488507
You can configure the location of the log file for the driver as well as the log level using the following `php.ini` settings:

0 commit comments

Comments
 (0)