UNPKG

postgrejs

Version:

Professional PostgreSQL client NodeJS

247 lines (246 loc) 7.09 kB
import { Protocol } from './protocol/protocol.js'; var DataFormat = Protocol.DataFormat; // @ts-ignore Symbol.asyncDispose ?? (Symbol.asyncDispose = Symbol('Symbol.asyncDispose')); export { DataFormat }; export const DEFAULT_COLUMN_FORMAT = DataFormat.binary; export var ConnectionState; (function (ConnectionState) { ConnectionState[ConnectionState["CLOSED"] = 0] = "CLOSED"; ConnectionState[ConnectionState["CONNECTING"] = 1] = "CONNECTING"; ConnectionState[ConnectionState["AUTHORIZING"] = 3] = "AUTHORIZING"; ConnectionState[ConnectionState["READY"] = 2] = "READY"; ConnectionState[ConnectionState["CLOSING"] = 10] = "CLOSING"; })(ConnectionState || (ConnectionState = {})); export const DataTypeOIDs = { bool: 16, bytea: 17, char: 18, name: 19, int8: 20, int2: 21, int2vector: 22, int4: 23, regproc: 24, text: 25, oid: 26, tid: 27, xid: 28, cid: 29, oidvector: 30, json: 114, xml: 142, point: 600, lseg: 601, path: 602, box: 603, polygon: 604, line: 628, cidr: 650, float4: 700, float8: 701, unknown: 705, circle: 718, macaddr8: 774, money: 790, macaddr: 829, inet: 869, bpchar: 1042, varchar: 1043, date: 1082, time: 1083, timestamp: 1114, timestamptz: 1184, interval: 1186, timetz: 1266, bit: 1560, varbit: 1562, numeric: 1700, refcursor: 1790, regprocedure: 2202, regoper: 2203, regoperator: 2204, regclass: 2205, regtype: 2206, record: 2249, cstring: 2275, any: 2276, anyarray: 2277, void: 2278, trigger: 2279, language_handler: 2280, internal: 2281, anyelement: 2283, anynonarray: 2776, uuid: 2950, jsonb: 3802, anyrange: 3831, int4range: 3904, numrange: 3906, tsrange: 3908, rstzrange: 3910, daterange: 3912, int8range: 3926, _xml: 143, _json: 199, _xid8: 271, _line: 629, _cidr: 651, _circle: 719, _macaddr8: 775, _money: 791, _bool: 1000, _bytea: 1001, _char: 1002, _name: 1003, _int2: 1005, _int2vector: 1006, _int4: 1007, _regproc: 1008, _text: 1009, _tid: 1010, _xid: 1011, _cid: 1012, _oidvector: 1013, _bpchar: 1014, _varchar: 1015, _int8: 1016, _point: 1017, _lseg: 1018, _path: 1019, _box: 1020, _float4: 1021, _float8: 1022, _polygon: 1027, _oid: 1028, _macaddr: 1040, _inet: 1041, _timestamp: 1115, _date: 1182, _time: 1183, _timestamptz: 1185, _interval: 1187, _numeric: 1231, _cstring: 1263, _timetz: 1270, _bit: 1561, _varbit: 1563, _uuid: 2951, _jsonb: 3807, }; export const DataTypeNames = { [DataTypeOIDs.bool]: 'bool', [DataTypeOIDs.bytea]: 'bytea', [DataTypeOIDs.char]: 'char', [DataTypeOIDs.name]: 'name', [DataTypeOIDs.int8]: 'int8', [DataTypeOIDs.int2]: 'int2', [DataTypeOIDs.int2vector]: 'int2vector', [DataTypeOIDs.int4]: 'int4', [DataTypeOIDs.regproc]: 'regproc', [DataTypeOIDs.text]: 'text', [DataTypeOIDs.oid]: 'oid', [DataTypeOIDs.tid]: 'tid', [DataTypeOIDs.xid]: 'xid', [DataTypeOIDs.cid]: 'cid', [DataTypeOIDs.oidvector]: 'oidvector', [DataTypeOIDs.json]: 'json', [DataTypeOIDs.xml]: 'xml', [DataTypeOIDs.point]: 'point', [DataTypeOIDs.lseg]: 'lseg', [DataTypeOIDs.path]: 'path', [DataTypeOIDs.box]: 'box', [DataTypeOIDs.polygon]: 'polygon', [DataTypeOIDs.line]: 'line', [DataTypeOIDs.cidr]: 'cidr', [DataTypeOIDs.float4]: 'float4', [DataTypeOIDs.float8]: 'float8', [DataTypeOIDs.unknown]: 'unknown', [DataTypeOIDs.circle]: 'circle', [DataTypeOIDs.macaddr8]: 'macaddr8', [DataTypeOIDs.money]: 'money', [DataTypeOIDs.macaddr]: 'macaddr', [DataTypeOIDs.inet]: 'inet', [DataTypeOIDs.bpchar]: 'bpchar', [DataTypeOIDs.varchar]: 'varchar', [DataTypeOIDs.date]: 'date', [DataTypeOIDs.time]: 'time', [DataTypeOIDs.timestamp]: 'timestamp', [DataTypeOIDs.timestamptz]: 'timestamptz', [DataTypeOIDs.interval]: 'interval', [DataTypeOIDs.timetz]: 'timetz', [DataTypeOIDs.bit]: 'bit', [DataTypeOIDs.varbit]: 'varbit', [DataTypeOIDs.numeric]: 'numeric', [DataTypeOIDs.refcursor]: 'refcursor', [DataTypeOIDs.regprocedure]: 'regprocedure', [DataTypeOIDs.regoper]: 'regoper', [DataTypeOIDs.regoperator]: 'regoperator', [DataTypeOIDs.regclass]: 'regclass', [DataTypeOIDs.regtype]: 'regtype', [DataTypeOIDs.record]: 'record', [DataTypeOIDs.cstring]: 'cstring', [DataTypeOIDs.any]: 'any', [DataTypeOIDs.anyarray]: 'anyarray', [DataTypeOIDs.void]: 'void', [DataTypeOIDs.trigger]: 'trigger', [DataTypeOIDs.language_handler]: 'language_handler', [DataTypeOIDs.internal]: 'internal', [DataTypeOIDs.anyelement]: 'anyelement', [DataTypeOIDs.anynonarray]: 'anynonarray', [DataTypeOIDs.uuid]: 'uuid', [DataTypeOIDs.jsonb]: 'jsonb', [DataTypeOIDs.anyrange]: 'anyrange', [DataTypeOIDs.int4range]: 'int4range', [DataTypeOIDs.numrange]: 'numrange', [DataTypeOIDs.tsrange]: 'tsrange', [DataTypeOIDs.rstzrange]: 'rstzrange', [DataTypeOIDs.daterange]: 'daterange', [DataTypeOIDs.int8range]: 'int8range', [DataTypeOIDs._xml]: '_xml', [DataTypeOIDs._json]: '_json', [DataTypeOIDs._xid8]: '_xid8', [DataTypeOIDs._line]: '_line', [DataTypeOIDs._cidr]: '_cidr', [DataTypeOIDs._circle]: '_circle', [DataTypeOIDs._macaddr8]: '_macaddr8', [DataTypeOIDs._money]: '_money', [DataTypeOIDs._bool]: '_bool', [DataTypeOIDs._bytea]: '_bytea', [DataTypeOIDs._char]: '_char', [DataTypeOIDs._name]: '_name', [DataTypeOIDs._int2]: '_int2', [DataTypeOIDs._int2vector]: '_int2vector', [DataTypeOIDs._int4]: '_int4', [DataTypeOIDs._regproc]: '_regproc', [DataTypeOIDs._text]: '_text', [DataTypeOIDs._tid]: '_tid', [DataTypeOIDs._xid]: '_xid', [DataTypeOIDs._cid]: '_cid', [DataTypeOIDs._oidvector]: '_oidvector', [DataTypeOIDs._bpchar]: '_bpchar', [DataTypeOIDs._varchar]: '_varchar', [DataTypeOIDs._int8]: '_int8', [DataTypeOIDs._point]: '_point', [DataTypeOIDs._lseg]: '_lseg', [DataTypeOIDs._path]: '_path', [DataTypeOIDs._box]: '_box', [DataTypeOIDs._float4]: '_float4', [DataTypeOIDs._float8]: '_float8', [DataTypeOIDs._polygon]: '_polygon', [DataTypeOIDs._oid]: '_oid', [DataTypeOIDs._macaddr]: '_macaddr', [DataTypeOIDs._inet]: '_inet', [DataTypeOIDs._timestamp]: '_timestamp', [DataTypeOIDs._date]: '_date', [DataTypeOIDs._time]: '_time', [DataTypeOIDs._timestamptz]: '_timestamptz', [DataTypeOIDs._interval]: '_interval', [DataTypeOIDs._numeric]: '_numeric', [DataTypeOIDs._cstring]: '_cstring', [DataTypeOIDs._timetz]: '_timetz', [DataTypeOIDs._bit]: '_bit', [DataTypeOIDs._varbit]: '_varbit', [DataTypeOIDs._uuid]: '_uuid', [DataTypeOIDs._jsonb]: '_jsonb', };