CARVIEW |
Select Language
HTTP/2 200
date: Sun, 20 Jul 2025 04:02:30 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/neo4j/neo4j-javascript-driver.git
etag: W/"5dc2c7131fbaa48fc6552e9610fb8406"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=Fhp6fKkJIOZGewKGdlNrtA%2FIjtBVuzjIE0IU841JU1%2F4Q3JgoeNgApUVH8auqUEg%2BfJROsKrg4FrEfCAm5dPv5DwdH5l49cQZCa3uXM1KDfimkW0sCBC2trv16nkDjFYNkI6LOUWFI6sQWqvWxcxuZkxeov75UvvKubFjwYB9pZItOwT%2BmTT1jYxCUGUnr9BQfphRidH9VGowhv9r%2BBPqmFSRNfFfmgLoDCbXeXFh2SIninEELiaefgTEs%2BPWiWdB00s4BaF2XG4aiyagXkUYg%3D%3D--zmDd46bXwzb9Wx34--p%2BVks3UAitHkM5P4xFeLVQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.55301075.1752984149; Path=/; Domain=github.com; Expires=Mon, 20 Jul 2026 04:02:29 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 20 Jul 2026 04:02:29 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D954:0A65:5EA745:7E00E0:687C6A55
Hide protocol object behind the Connection (#1139) · neo4j/neo4j-javascript-driver@48f6af6 · GitHub
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection-provider/connection-provider-pooled.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection/connection-channel.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection/connection-delegate.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection/connection.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/pool/pool.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/test/connection-provider/connection-provider-direct.test.js
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit 48f6af6
authored
Hide protocol object behind the Connection (#1139)
The connection in the driver is exposing the protocol object, which is not great. Improve this part of the code can be done by make the connection object have methods to do high level requests to the server.
List of calls the core driver does using the protocol, by passing the connection:
* `version`
* `run`
* `beginTransaction`
* `commitTransaction`
* `rollbackTransaction`
Methods is present in the `Connection` interface (used by core in **bold**):
* `id`
* `database`
* `server`
* `authToken`
* `address`
* `version`
* `supportsReAuth`
* **`isOpen`**
* **`protocol`**
* `connect`
* `write`
* **`resetAndFlush`**
* **`hasOngoingObservableRequests`**
* **`_release`**
So, `isOpen`, `resetAndFlush` and `hasOngoingObservableRequests` are the methods which will stay in the connection along with the new methods. The method `release` will move the a `Releasable` interface, which will be composed with `Connection` when returning the connection from the provider.
The `Releasable` interface is also defined to enable the `ConnectionProvider` returns a connection which can be released back to the pool.
Internally, `bolt-connection` can keep exposing the internal of the connection outside the connection in a first moment. The full encapsulation of the `protocol` should be done in the next phase of refactoring.1 parent cf1fde8 commit 48f6af6Copy full SHA for 48f6af6
File tree
Expand file treeCollapse file tree
38 files changed
+1118
-605
lines changedFilter options
- packages
- bolt-connection
- src
- connection-provider
- connection
- pool
- test
- connection-provider
- connection
- pool
- core
- src
- internal
- test
- utils
- neo4j-driver-deno/lib
- bolt-connection
- connection-provider
- connection
- pool
- core
- internal
- neo4j-driver/test/internal
Expand file treeCollapse file tree
38 files changed
+1118
-605
lines changedpackages/bolt-connection/src/connection-provider/connection-provider-pooled.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection-provider/connection-provider-pooled.js+4-4Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
| 85 | + | |
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
| 163 | + | |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| |||
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
194 |
| - | |
| 194 | + | |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
| |||
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
204 |
| - | |
| 204 | + | |
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
|
packages/bolt-connection/src/connection/connection-channel.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection/connection-channel.js+20Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
159 | 179 |
| |
160 | 180 |
| |
161 | 181 |
| |
|
packages/bolt-connection/src/connection/connection-delegate.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection/connection-delegate.js+22-2Lines changed: 22 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
38 | 58 |
| |
39 | 59 |
| |
40 | 60 |
| |
| |||
103 | 123 |
| |
104 | 124 |
| |
105 | 125 |
| |
106 |
| - | |
| 126 | + | |
107 | 127 |
| |
108 | 128 |
| |
109 | 129 |
| |
110 | 130 |
| |
111 |
| - | |
| 131 | + | |
112 | 132 |
| |
113 | 133 |
|
packages/bolt-connection/src/connection/connection.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/connection/connection.js+3-20Lines changed: 3 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 |
| - | |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
26 | 27 |
| |
| 28 | + | |
27 | 29 |
| |
28 | 30 |
| |
29 | 31 |
| |
| |||
51 | 53 |
| |
52 | 54 |
| |
53 | 55 |
| |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 | 56 |
| |
62 | 57 |
| |
63 | 58 |
| |
| |||
109 | 104 |
| |
110 | 105 |
| |
111 | 106 |
| |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 | 107 |
| |
125 | 108 |
| |
126 | 109 |
| |
|
packages/bolt-connection/src/pool/pool.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/pool/pool.js+42-39Lines changed: 42 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
273 | 273 |
| |
274 | 274 |
| |
275 | 275 |
| |
276 |
| - | |
277 |
| - | |
278 |
| - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
279 | 313 |
| |
280 | 314 |
| |
281 |
| - | |
| 315 | + | |
282 | 316 |
| |
283 | 317 |
| |
284 | 318 |
| |
285 | 319 |
| |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 |
| - | |
304 |
| - | |
305 |
| - | |
306 |
| - | |
307 |
| - | |
308 |
| - | |
309 | 320 |
| |
310 |
| - | |
311 |
| - | |
312 |
| - | |
313 |
| - | |
314 |
| - | |
315 |
| - | |
316 |
| - | |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
| 321 | + | |
| 322 | + | |
321 | 323 |
| |
322 |
| - | |
| 324 | + | |
| 325 | + | |
323 | 326 |
| |
324 | 327 |
| |
325 | 328 |
| |
|
packages/bolt-connection/test/connection-provider/connection-provider-direct.test.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/test/connection-provider/connection-provider-direct.test.js+7-7Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
289 | 289 |
| |
290 | 290 |
| |
291 | 291 |
| |
292 |
| - | |
| 292 | + | |
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
| |||
546 | 546 |
| |
547 | 547 |
| |
548 | 548 |
| |
549 |
| - | |
| 549 | + | |
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
| |||
599 | 599 |
| |
600 | 600 |
| |
601 | 601 |
| |
602 |
| - | |
| 602 | + | |
603 | 603 |
| |
604 | 604 |
| |
605 | 605 |
| |
606 | 606 |
| |
607 | 607 |
| |
608 | 608 |
| |
609 | 609 |
| |
610 |
| - | |
| 610 | + | |
611 | 611 |
| |
612 | 612 |
| |
613 | 613 |
| |
| |||
636 | 636 |
| |
637 | 637 |
| |
638 | 638 |
| |
639 |
| - | |
| 639 | + | |
640 | 640 |
| |
641 | 641 |
| |
642 | 642 |
| |
| |||
692 | 692 |
| |
693 | 693 |
| |
694 | 694 |
| |
695 |
| - | |
| 695 | + | |
696 | 696 |
| |
697 | 697 |
| |
698 | 698 |
| |
| |||
782 | 782 |
| |
783 | 783 |
| |
784 | 784 |
| |
785 |
| - | |
| 785 | + | |
786 | 786 |
| |
787 | 787 |
| |
788 | 788 |
| |
|
You can’t perform that action at this time.
0 commit comments