From 083296d689e4a40dc0bebb0a6f69c8342d6d3a2e Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 1 Jul 2020 16:33:03 +0200 Subject: Preserve type when writing int to dyncols --- test/it_dbi.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/it_dbi.t') diff --git a/test/it_dbi.t b/test/it_dbi.t index 45f70d4..5737404 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -323,6 +323,8 @@ is( # REPLACE (without and with quoting) $r = new it_dbi_test; $r->replace(['ID' => 5, '-key1' => "2*2"]); is($r->key1, 4); +$r->replace(['ID' => 5, 'key1' => 42]); is(json_encode($r->key1), json_encode(42), "Preserve type int on dyncols insert"); +$r->update(['key1' => 43]); is(json_encode($r->key1), json_encode(43), "Preserve type int on dyncols update"); $r->replace(['ID' => 5, 'key1' => "val0'"]); is($r->key1, "val0'"); # UPDATE with WHERE (without and with quoting) -- cgit v1.2.3