MCPcopy Index your code
hub / github.com/brianc/node-postgres / submit

Method submit

packages/pg-cursor/index.js:43–81  ·  view source on GitHub ↗
(connection)

Source from the content-addressed store, hash-verified

41 }
42
43 submit(connection) {
44 this.state = 'submitted'
45 this.connection = connection
46 this._portal = 'C_' + nextUniqueID++
47
48 const con = connection
49
50 con.parse(
51 {
52 text: this.text,
53 },
54 true
55 )
56
57 con.bind(
58 {
59 portal: this._portal,
60 values: this.values,
61 },
62 true
63 )
64
65 con.describe(
66 {
67 type: 'P',
68 name: this._portal, // AWS Redshift requires a portal name
69 },
70 true
71 )
72
73 con.flush()
74
75 if (this._conf.types) {
76 this._result._getTypeParser = this._conf.types.getTypeParser
77 }
78
79 con.once('noData', this._ifNoData)
80 con.once('rowDescription', this._rowDescription)
81 }
82
83 _shiftQueue() {
84 if (this._queue.length) {

Callers

nothing calls this directly

Calls 4

bindMethod · 0.80
describeMethod · 0.80
parseMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected