We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, what is the recommended way to insert records with mixed types? The docs suggest using Appender or do I just go back to plain old SQL inserts?
struct Person { first_name: String, last_name: String, dob: NaiveDate, } let db = Connection::open_in_memory()?; db.execute_batch("CREATE TABLE foo(first_name VARCHAR, last_name VARCHAR, dob DATE);")?; let person1 = Person { first_name: String::from("John"), last_name: String::from("Smith"), dob: NaiveDate::from_ymd_opt(1970, 1, 1).unwrap(), }; let person2 = Person { first_name: String::from("Jane"), last_name: String::from("Smith"), dob: NaiveDate::from_ymd_opt(1975, 1, 1).unwrap(), }; { let mut app = db.appender("foo")?; // Something like this ... app.append_rows([person1, person2])?; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, what is the recommended way to insert records with mixed types? The docs suggest using Appender or do I just go back to plain old SQL inserts?
The text was updated successfully, but these errors were encountered: