From a8120f8b7cd01e11eaf6cf3d339c4c92d99407bf Mon Sep 17 00:00:00 2001 From: wangxingzhen Date: Wed, 30 Oct 2024 14:05:59 +0800 Subject: [PATCH] Optimize JSONB key names --- lib/postgres.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/postgres.js b/lib/postgres.js index 4f16e05..e69f7bd 100644 --- a/lib/postgres.js +++ b/lib/postgres.js @@ -256,13 +256,13 @@ class Postgres { res.w = s.wear; } if (s.scale) { - res.scale = s.scale; + res.sc = s.scale; } if (s.rotation) { res.r = s.rotation; } if (s.tint_id) { - res.tint_id = s.tint_id; + res.t = s.tint_id; } if (s.offset_x) { res.x = s.offset_x; @@ -274,7 +274,7 @@ class Postgres { res.z = s.offset_z; } if (s.pattern) { - res.pattern = s.pattern; + res.p = s.pattern; } return res; }) : null; @@ -394,13 +394,13 @@ class Postgres { sticker_id: s.i, slot: s.s, wear: s.w, - scale: s.scale, + scale: s.sc, rotation: s.r, - tint_id: s.tint_id, + tint_id: s.t, offset_x: s.x, offset_y: s.y, offset_z: s.z, - pattern: s.pattern, + pattern: s.p, } });