Skip to content

Commit

Permalink
cassandra: Add support for "bigint" value type.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Jan 10, 2017
1 parent d165b70 commit 0787b76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib-sql/driver-cassandra.c
Expand Up @@ -1001,6 +1001,18 @@ driver_cassandra_get_value(struct cassandra_result *result,
type = "int32";
break;
}
case CASS_VALUE_TYPE_BIGINT: {
cass_int64_t num;

rc = cass_value_get_int64(value, &num);
if (rc == CASS_OK) {
const char *str = t_strdup_printf("%lld", (long long)num);
output_size = strlen(str);
output = (const void *)str;
}
type = "int64";
break;
}
default:
rc = cass_value_get_bytes(value, &output, &output_size);
type = "bytes";
Expand Down

0 comments on commit 0787b76

Please sign in to comment.