-
Notifications
You must be signed in to change notification settings - Fork 32
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
Feature Request: Change of field types #13
Comments
I'll try to look into that |
In the csv-library it is possible to define the Record-type: //tutorial-read-serde-03.rs
use std::collections::HashMap;
// This introduces a type alias so that we can conveniently reference our
// record type.
type Record = HashMap<String, String>;
fn run() -> Result<(), Box<Error>> {
let mut rdr = csv::Reader::from_reader(io::stdin());
for result in rdr.deserialize() {
let record: Record = result?;
println!("{:?}", record);
}
Ok(())
} Maybe we can have something similar? |
There is already something close to this I think the feature requested here is more about changing a filed type rather than that serialization. Changing a field type should be doable by reading the file, changing the types in the Record and create the appropriate writer. |
Yeah that's exactly what I meant. Where this idea comes from is easy.... In the company I work for we use the old DOS program "DBase" this program allows it you to edit .dbf files both header and body So you have for example the field And now you can go and change that "Type" to "Numeric" and the program would create a new dbf file with the correct header and changed body values |
Is it possible to get support for changing the type of a field?
For example:
The .dbf file has a "Numeric" field that would be changed into a "Character" field
The text was updated successfully, but these errors were encountered: