CPP-153 Schema Metadata

Mike is working some changes that will make this more generic. API changes
also. May want to stop further test development for now.

On Tue, Oct 28, 2014 at 12:39 PM, Fero <notifications@github.com> wrote:

> In src/schema_metadata.cpp:
>
> > +ColumnFamilyMetadata ColumnFamilyMetadata::from_schema_row(const Row* schema_row) {
> > +  ColumnFamilyMetadata cfm;
> > +  get_optional_string(schema_row->get_by_name("columnfamily_name"), &cfm.name_);
> > +  cass_value_get_double(CassValue::to(schema_row->get_by_name("bloom_filter_fp_chance")), &cfm.bloom_filter_fp_chance_);
> > +  get_optional_string(schema_row->get_by_name("caching"), &cfm.caching_);
> > +  cass_value_get_uuid(CassValue::to(schema_row->get_by_name("cf_id")), cfm.cf_id_);
> > +  get_optional_string(schema_row->get_by_name("column_aliases"), &cfm.column_aliases_);
> > +  get_optional_string(schema_row->get_by_name("comment"), &cfm.comment_);
> > +  get_optional_string(schema_row->get_by_name("compaction_strategy_class"), &cfm.compaction_strategy_class_);
> > +  get_optional_string(schema_row->get_by_name("compaction_strategy_options"), &cfm.compaction_strategy_options_);
> > +  get_optional_string(schema_row->get_by_name("comparator"), &cfm.comparator_);
> > +  get_optional_string(schema_row->get_by_name("compression_parameters"), &cfm.compression_parameters_);
> > +  cass_value_get_int32(CassValue::to(schema_row->get_by_name("default_time_to_live")), &cfm.default_time_to_live_);
> > +  get_optional_string(schema_row->get_by_name("default_validator"), &cfm.default_validator_);
> > +
> > +  MapIterator itr(schema_row->get_by_name("dropped_columns"));
>
> This causes a segfault using Cassandra 1.2.x because dropped_columns is
> not a table property in this version and get_by_name returns NULL for
> iterator assignment.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/datastax/cpp-driver/pull/85/files#r19488862>.
>