Is there a way to enable/disable the schema metadata momentarily, like with:
session.SetSchemaMetadataEnabled()
in the java driver? If not, what would be a proper alternative? Thanks.
Is there a way to enable/disable the schema metadata momentarily, like with:
session.SetSchemaMetadataEnabled()
in the java driver? If not, what would be a proper alternative? Thanks.
[UPDATED] The equivalent method in the C# driver is SetMetadataSyncEnabled()
provided by the MetadataSyncOptions
API.
To disable metadata sync, set the value of MetadataSyncEnabled
to false, for example:
var cluster = Cluster.Builder() .AddContactPoint("127.0.0.1") .WithMetadataSyncOptions(new MetadataSyncOptions().SetMetadataSyncEnabled(false)) .Build();
To enable metadata sync, set the value of MetadataSyncEnabled
to true, for example:
var cluster = Cluster.Builder() .AddContactPoint("127.0.0.1") .WithMetadataSyncOptions(new MetadataSyncOptions().SetMetadataSyncEnabled(true)) .Build();
WARNING - Unlike SetSchemaMetadataEnabled()
in the Java driver, you must invoke RefreshSchemaAsync()
to force an update of the driver metadata.
For details, see Cluster and schema metadata in the C# driver. Cheers!
Hi Erick. The question was whether that's doable in the C# driver.
8 People are following this question.
Why does Cassandra always save the timezone as UTC with DateTimeOffset?
Need help implement server side filtering and pagination for UI grid
Does the C# Driver support TTL with the Mapper Component?
DataStax C# Driver doesnt output special characters
Does the C# driver support navigating to previous results page?
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use