-
Notifications
You must be signed in to change notification settings - Fork 0
/
out.js.map
7 lines (7 loc) · 2.4 KB
/
out.js.map
1
2
3
4
5
6
7
{
"version": 3,
"sources": ["runme.ts"],
"sourcesContent": ["import PG from \"pg\";\n\nfunction login_nossl_nopassword() {\n return new PG.Client({\n host: \"localhost\",\n port: 5432,\n database: \"auth_db\",\n user: \"role_ssl_passwd\",\n password: \"role_ssl_passwd\",\n ssl: {\n rejectUnauthorized: false,\n },\n // will crash backend for some reason binary: true,\n });\n}\n\nconst query1 = {\n text: \"PREPARE fooplanx (varchar) AS select oid, typname from pg_type where typname = $1\",\n};\n\nconst query2 = {\n text: \"select * from pg_prepared_statements\",\n};\n\nfunction delay(ts_in_sec: number) {\n const ts_in_ms = Math.trunc(ts_in_sec * 1e3);\n return new Promise((resolve) => setTimeout(resolve, ts_in_ms));\n}\n\nasync function testConnection(connection: () => PG.Client) {\n // postgres[ql]://[username[:password]@][host[:port],]/database[?parameter_list]\n const cl = connection();\n await cl.connect();\n {\n const rows = await cl.query({\n name: \"foobar\",\n //portal: \"foobar\",\n text: \"select oid, typname from pg_type where typname = $1\",\n values: [\"bool\"],\n });\n console.log(\"prepare plan rows: [%o]\", rows);\n }\n await delay(3);\n {\n const rows = await cl.query({\n text: \"select * from pg_prepared_statements\",\n });\n console.log(\"query pg_prepared_statements: [%o]\", rows);\n }\n /*await new Promise((resolve) => setTimeout(resolve, 3e3));\n {\n const rows = await cl.query({\n text: \"execute foobar('bool')\",\n });\n console.log(\"query result: [%o]]\", rows);\n }*/\n}\n\ntestConnection(login_nossl_nopassword);\n"],
"mappings": "AAAA,OAAO,QAAQ;AAEf,SAAS,yBAAyB;AAChC,SAAO,IAAI,GAAG,OAAO;AAAA,IACnB,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,KAAK;AAAA,MACH,oBAAoB;AAAA,IACtB;AAAA;AAAA,EAEF,CAAC;AACH;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AACR;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AACR;AAEA,SAAS,MAAM,WAAmB;AAChC,QAAM,WAAW,KAAK,MAAM,YAAY,GAAG;AAC3C,SAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,QAAQ,CAAC;AAC/D;AAEA,eAAe,eAAe,YAA6B;AAEzD,QAAM,KAAK,WAAW;AACtB,QAAM,GAAG,QAAQ;AACjB;AACE,UAAM,OAAO,MAAM,GAAG,MAAM;AAAA,MAC1B,MAAM;AAAA;AAAA,MAEN,MAAM;AAAA,MACN,QAAQ,CAAC,MAAM;AAAA,IACjB,CAAC;AACD,YAAQ,IAAI,2BAA2B,IAAI;AAAA,EAC7C;AACA,QAAM,MAAM,CAAC;AACb;AACE,UAAM,OAAO,MAAM,GAAG,MAAM;AAAA,MAC1B,MAAM;AAAA,IACR,CAAC;AACD,YAAQ,IAAI,sCAAsC,IAAI;AAAA,EACxD;AAQF;AAEA,eAAe,sBAAsB;",
"names": []
}