Skip to content

Commit 35b8afd

Browse files
committed
Add support for type mapping
Similar to Kanel's customTypeMap. One use case for this is allowing one to treat PG extension types as some other types that they behave as (e.g., map public.ulid to String). Fixes #246
1 parent d1229ae commit 35b8afd

File tree

11 files changed

+178
-73
lines changed

11 files changed

+178
-73
lines changed

Cargo.lock

Lines changed: 38 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benches/codegen.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ fn bench(c: &mut Criterion) {
1717
gen_sync: true,
1818
gen_async: false,
1919
derive_ser: true,
20+
config: Default::default(),
2021
},
2122
)
2223
.unwrap()
@@ -32,6 +33,7 @@ fn bench(c: &mut Criterion) {
3233
gen_sync: true,
3334
gen_async: false,
3435
derive_ser: true,
36+
config: Default::default(),
3537
},
3638
)
3739
.unwrap()

benches/execution/diesel_benches.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,7 @@ pub fn bench_insert(b: &mut Bencher, conn: &mut PgConnection, size: usize) {
164164
};
165165
let insert = &insert;
166166

167-
b.iter(|| {
168-
let insert = insert;
169-
insert(conn)
170-
})
167+
b.iter(|| insert(conn))
171168
}
172169

173170
pub fn loading_associations_sequentially(b: &mut Bencher, conn: &mut PgConnection) {

crates/cornucopia/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ heck = "0.4.0"
3333

3434
# Order-preserving map to work around borrowing issues
3535
indexmap = "2.0.2"
36+
37+
# Config handling
38+
serde = { version = "1.0.203", features = ["derive"] }
39+
toml = "0.8.14"

0 commit comments

Comments
 (0)