Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,13 @@ SCYLLA_EXAMPLES_TO_RUN := \
concurrent_executions \
date_time \
duration \
execution_profiles \
maps \
named_parameters \
paging \
perf \
prepared \
schema_meta \
simple \
ssl \
tracing \
Expand All @@ -150,20 +153,16 @@ SCYLLA_EXAMPLES_TO_RUN := \
uuids \

# auth <- unimplemented `cass_cluster_set_authenticator_callbacks()`
# execution_profiles <- unimplemented `cass_statement_set_keyspace()`
# host_listener <- unimplemented `cass_cluster_set_host_listener_callback()`
# logging <- unimplemented `cass_cluster_set_host_listener_callback()`
# perf <- unimplemented `cass_cluster_set_queue_size_io()`
# schema_meta <- unimplemented multiple schema-related functions
# cloud <- out of interest for us, not related to ScyllaDB
endif

ifndef CCM_COMMIT_ID
export CCM_COMMIT_ID := master
endif

ifndef SCYLLA_VERSION
SCYLLA_VERSION := release:6.1.1
SCYLLA_VERSION := release:2025.3
endif

ifndef CASSANDRA_VERSION
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions examples/cloud/CMakeLists.txt

This file was deleted.

109 changes: 0 additions & 109 deletions examples/cloud/cloud.c

This file was deleted.

3 changes: 1 addition & 2 deletions examples/execution_profiles/execution_profiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ CassError insert_into_examples(CassSession* session, const char* profile_name, c
}
}
cass_statement_set_keyspace(statement, "execution_profiles");
cass_statement_add_key_index(statement, 0);
cass_statement_bind_string(statement, 0, key);
cass_statement_bind_bool(statement, 1, value);
future = cass_session_execute(session, statement);
Expand Down Expand Up @@ -205,7 +204,7 @@ int main(int argc, char* argv[]) {

/* Create a keyspace and table for the execution profile example */
execute_query(session, "CREATE KEYSPACE IF NOT EXISTS examples WITH replication = { \
'class': 'SimpleStrategy', 'replication_factor': '3' \
'class': 'NetworkTopologyStrategy', 'replication_factor': '3' \
}");
execute_query(session, "CREATE TABLE IF NOT EXISTS examples.execution_profiles ( \
key text PRIMARY KEY, \
Expand Down
1 change: 0 additions & 1 deletion examples/perf/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ CassCluster* create_cluster(const char* hosts) {
cass_cluster_set_contact_points(cluster, hosts);
cass_cluster_set_credentials(cluster, "cassandra", "cassandra");
cass_cluster_set_num_threads_io(cluster, NUM_IO_WORKER_THREADS);
cass_cluster_set_queue_size_io(cluster, 10000);
cass_cluster_set_core_connections_per_shard(cluster, 1);
return cluster;
}
Expand Down
39 changes: 0 additions & 39 deletions examples/schema_meta/schema_meta.c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we understood each other when it comes to this example.
I understand that we won't implement metadata raw string accessors because:

  • It is difficult (requires duplicating work already done by Rust Driver, or exposing some new APIs from Rust Driver)
  • They have no good use case and it is better to use normal metadata API that we implemented in the driver.

Now I see that in this example you removed usage of raw string metadata API, but did not replace it with normal metadata API. Why? It should be replaced, if not for other reason then to prove that our decision to not implement raw API was correct.

Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ void print_schema_value(const CassValue* value);
void print_schema_bytes(const CassValue* value);
void print_schema_list(const CassValue* value);
void print_schema_map(const CassValue* value);
void print_meta_field(const CassIterator* iterator, int indent);
void print_meta_fields(CassIterator* iterator, int indent);
void print_column_meta(const CassColumnMeta* meta, int indent);
void print_index_meta(const CassIndexMeta* meta, int indent);

Expand Down Expand Up @@ -318,27 +316,6 @@ void print_schema_map(const CassValue* value) {
cass_iterator_free(iterator);
}

void print_meta_field(const CassIterator* iterator, int indent) {
const char* name;
size_t name_length;
const CassValue* value;

cass_iterator_get_meta_field_name(iterator, &name, &name_length);
value = cass_iterator_get_meta_field_value(iterator);

print_indent(indent);
printf("%.*s: ", (int)name_length, name);
print_schema_value(value);
printf("\n");
}

void print_meta_fields(CassIterator* iterator, int indent) {
while (cass_iterator_next(iterator)) {
print_meta_field(iterator, indent);
}
cass_iterator_free(iterator);
}

void print_keyspace_meta(const CassKeyspaceMeta* meta, int indent) {
const char* name;
size_t name_length;
Expand All @@ -348,9 +325,6 @@ void print_keyspace_meta(const CassKeyspaceMeta* meta, int indent) {
cass_keyspace_meta_name(meta, &name, &name_length);
printf("Keyspace \"%.*s\":\n", (int)name_length, name);

print_meta_fields(cass_iterator_fields_from_keyspace_meta(meta), indent + 1);
printf("\n");

iterator = cass_iterator_tables_from_keyspace_meta(meta);
while (cass_iterator_next(iterator)) {
print_table_meta(cass_iterator_get_table_meta(iterator), indent + 1);
Expand All @@ -369,9 +343,6 @@ void print_table_meta(const CassTableMeta* meta, int indent) {
cass_table_meta_name(meta, &name, &name_length);
printf("Table \"%.*s\":\n", (int)name_length, name);

print_meta_fields(cass_iterator_fields_from_table_meta(meta), indent + 1);
printf("\n");

iterator = cass_iterator_columns_from_table_meta(meta);
while (cass_iterator_next(iterator)) {
print_column_meta(cass_iterator_get_column_meta(iterator), indent + 1);
Expand All @@ -396,9 +367,6 @@ void print_function_meta(const CassFunctionMeta* meta, int indent) {
print_indent(indent);
cass_function_meta_name(meta, &name, &name_length);
printf("Function \"%.*s\":\n", (int)name_length, name);

print_meta_fields(cass_iterator_fields_from_function_meta(meta), indent + 1);
printf("\n");
}

void print_aggregate_meta(const CassAggregateMeta* meta, int indent) {
Expand All @@ -408,9 +376,6 @@ void print_aggregate_meta(const CassAggregateMeta* meta, int indent) {
print_indent(indent);
cass_aggregate_meta_name(meta, &name, &name_length);
printf("Aggregate \"%.*s\":\n", (int)name_length, name);

print_meta_fields(cass_iterator_fields_from_aggregate_meta(meta), indent + 1);
printf("\n");
}

void print_column_meta(const CassColumnMeta* meta, int indent) {
Expand All @@ -420,8 +385,6 @@ void print_column_meta(const CassColumnMeta* meta, int indent) {
print_indent(indent);
cass_column_meta_name(meta, &name, &name_length);
printf("Column \"%.*s\":\n", (int)name_length, name);
print_meta_fields(cass_iterator_fields_from_column_meta(meta), indent + 1);
printf("\n");
}

void print_index_meta(const CassIndexMeta* meta, int indent) {
Expand All @@ -431,6 +394,4 @@ void print_index_meta(const CassIndexMeta* meta, int indent) {
print_indent(indent);
cass_index_meta_name(meta, &name, &name_length);
printf("Index \"%.*s\":\n", (int)name_length, name);
print_meta_fields(cass_iterator_fields_from_index_meta(meta), indent + 1);
printf("\n");
}
Loading