Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get blob field data? #48

Closed
ghost opened this issue Jun 8, 2017 · 1 comment
Closed

How to get blob field data? #48

ghost opened this issue Jun 8, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 8, 2017

when i tried to get a blob data from oracle 11g, I ran into some problems. I googled it, but didn't have a solution. I need help.
My struct:

 struct Template {
    late_id: u32, 
    index_info: String,
    id: u32,
    lib: u8, 
    gender: u8,
    region: u16,
    year: u16,
    template: Vec<u8>,
 }

In the database, the template field corresponds to a blob filed。
Did i should get the blob field like this?if not, how can i get the blob field?

    let mut lib: Vec<Template> = Vec::new();
    while let Some(mut cursor) = stmt.fetch().unwrap() {
        lib.push(Template {
            template_id: cursor.get_data(1).unwrap().unwrap(),
            index_info: cursor.get_data(2).unwrap().unwrap(),
            id: cursor.get_data(4).unwrap().unwrap(),
            lib: cursor.get_data(5).unwrap().unwrap(),
            gender: cursor.get_data(6).unwrap().unwrap(),
            region: cursor.get_data(7).unwrap().unwrap(),
            year: cursor.get_data(9).unwrap().unwrap(),
            template: cursor.get_data(11).unwrap().unwrap(),// here, i couldn't compile it
        })
    }

can somebody help me? thank you!

@pacman82
Copy link
Contributor

We simply do not support Vec up to now. There is no particular reason for the missing support other than no one has implemented it yet. I have been away on vacation for the past three weeks, so I see your issue just now. I'm currently working on #41 and my solution is likely to fix this one, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants