GithubHelp home page GithubHelp logo

Comments (7)

rustyrazorblade avatar rustyrazorblade commented on August 28, 2024

I have a minimal main() you can use to verify.

extern crate cassandra;
use cassandra::*;
use std::str::FromStr;

fn main() {
    let mut cluster = Cluster::new();
    let contact_points = ContactPoints::from_str("127.0.0.1").unwrap();

    cluster.set_contact_points(contact_points).unwrap();
    cluster.set_load_balance_round_robin();

    let mut session = cluster.connect().unwrap();

    let query = String::from("select column_name, type from system_schema.columns where keyspace_name = 'cdmtest' and table_name = 'users'");

    println!("Keyspace query: {}", query);

    let schema_query = Statement::new(&query, 0);

    let result = session.execute(&schema_query).wait().unwrap();

    for row in result {
        let name : String = row.get_col_by_name("column_name").unwrap();
        let ftype : String = row.get_col_by_name("type").unwrap();

        println!("{} {}", name, ftype);
    }
    println!("Hello, world!");
}

from cassandra-rs.

rustyrazorblade avatar rustyrazorblade commented on August 28, 2024

I've added some debug into to my main() and it looks like the call to cass_value_type gets back the wrong information. I've run the program several times and I've gotten back all of the following:

CASS_VALUE_TYPE_DECIMAL
CASS_VALUE_TYPE_BIGINT
CASS_VALUE_TYPE_BLOB
CASS_VALUE_TYPE_BOOLEAN

from cassandra-rs.

rustyrazorblade avatar rustyrazorblade commented on August 28, 2024

I wonder if this is due to a change on the C driver in recent builds. I'm going to regen cassandra-sys and see if the problem goes away

from cassandra-rs.

jshook avatar jshook commented on August 28, 2024

Did you have any different behavior after your last regen?

from cassandra-rs.

rustyrazorblade avatar rustyrazorblade commented on August 28, 2024

No, still an issue

from cassandra-rs.

rustyrazorblade avatar rustyrazorblade commented on August 28, 2024

We should verify the equiv code actually works with the C driver

from cassandra-rs.

tupshin avatar tupshin commented on August 28, 2024

Fixed in 0.7.3.

from cassandra-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.