Skip to content

v9.0.0

Compare
Choose a tag to compare
@blackbeam blackbeam released this 25 Jan 18:19
· 499 commits to master since this release

Changes:

  1. JSON support.
  2. openssl updated to v0.9
  3. tcp_keepalive_timeout_ms option added.

JSON Support

  1. FromValue is implemented for rustc_serialize::json::Json and for Unserialized<T> where T: Decodable:

    #[derive(RustcDecodable)]
    struct DecodableStruct {
        // ...
    }
    // ...
    let (Unserialized(val),): (Unserialized<DecodableStruct>,)
        = from_row(row_with_single_json_column);
  2. From<Json> and From<Serialized<T>> where T: Encodable is implemented for Value:

    #[derive(RustcEncodable)]
    struct EncodableStruct {
        // ...
    }
    // ...
    conn.prep_exec("INSERT INTO table (json_column) VALUES (?)",
                   (Serialized(encodable_struct_instance),));