Commit dd6f188
feat(export-to-language): Add Go Support (#2991)
* Add bson-methods
* Add bson
* Add syntax
* Add partial
* Remove closures for timestamp comp
* Add DeclarationStore to transpiler
* Add documentaiton for DeclarationStore
* remove unecessary comments
* clean up generateCall comments
* correct the objectID example
* correct the objectID example
* Revert "correct the objectID example"
This reverts commit 1f58923.
* Add non-idiomatic
* Update packages/bson-transpilers/codegeneration/DeclarationStore.js
Co-authored-by: Anna Henningsen <[email protected]>
* Update packages/bson-transpilers/README.md
Co-authored-by: Anna Henningsen <[email protected]>
* add ruby to output languages in README.md
* Finish non-idiomatic
* Add imports
* add state to the transpiler class
* Clean up README.md
* Clean up README.md
* Clean up README.md
* Prevent re-declaration
* require template string when adding declarations
* update readme
* make comments uniform
* make store a hash
* change mock to candidate
* remove duplicate method
* fix more gramatical errors
* add comment to candidate explanation
* use bind instead of passing new args to existing templates
* update readme
* clean up how state is passed to bind
* Add driver template
* Add addFunc option to declaration store
* fix typo
* clean up syntax
* Clean everything up
* prepend variables with declarations
* fix imports
* add extra line to driver syntax
* add extra line to non-idiomatic
* uncomment the shell and python input for non-idiomatic
* remove unecessary comment
* add the ObjectId-Util test back
* add rust and go to transpiler readme
* Update packages/bson-transpilers/symbols/go/templates.yaml
Co-authored-by: Benjamin Rewis <[email protected]>
* Update packages/bson-transpilers/test/yaml/bson.yaml
Co-authored-by: Benjamin Rewis <[email protected]>
* Update packages/bson-transpilers/test/yaml/driver-syntax.yaml
Co-authored-by: Benjamin Rewis <[email protected]>
* clean syntax
* update the driver docs comment for go
* Add new line to go/templates.yaml
* add native tests
* replace () with {} for primitive.Regex
* remove compass-schema/lib
* remove compass metrics
* remove compass-explain-plan/lib
* remove compass-indexes/lib
* remove compass-collection-stats/lib
Co-authored-by: Anna Henningsen <[email protected]>
Co-authored-by: Benjamin Rewis <[email protected]>
Co-authored-by: Maurizio Casimirri <[email protected]>1 parent 44c7139 commit dd6f188
File tree
29 files changed
+2483
-35
lines changed- packages
- bson-transpilers
- codegeneration
- go
- object
- python
- lib/symbol-table
- symbols
- go
- ruby
- test
- yaml
- compass-components/src/components
- compass-export-to-language/src/components/select-lang
29 files changed
+2483
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
62 | 112 | | |
63 | 113 | | |
64 | 114 | | |
| |||
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| 71 | + | |
61 | 72 | | |
62 | 73 | | |
63 | | - | |
64 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
| |||
330 | 349 | | |
331 | 350 | | |
332 | 351 | | |
333 | | - | |
| 352 | + | |
334 | 353 | | |
335 | 354 | | |
336 | 355 | | |
| |||
494 | 513 | | |
495 | 514 | | |
496 | 515 | | |
497 | | - | |
| 516 | + | |
498 | 517 | | |
499 | 518 | | |
500 | 519 | | |
| |||
516 | 535 | | |
517 | 536 | | |
518 | 537 | | |
519 | | - | |
| 538 | + | |
520 | 539 | | |
521 | 540 | | |
522 | 541 | | |
| |||
526 | 545 | | |
527 | 546 | | |
528 | 547 | | |
529 | | - | |
| 548 | + | |
530 | 549 | | |
531 | 550 | | |
532 | 551 | | |
| |||
545 | 564 | | |
546 | 565 | | |
547 | 566 | | |
548 | | - | |
| 567 | + | |
549 | 568 | | |
550 | 569 | | |
551 | 570 | | |
| |||
Lines changed: 90 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments