[GODRIVER-985] Design & Implement drivergen Created: 19/Apr/19  Updated: 28/Oct/23  Resolved: 14/May/19

Status: Closed
Project: Go Driver
Component/s: Core API
Affects Version/s: None
Fix Version/s: 1.1.0

Type: New Feature Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Core API
Backwards Compatibility: Minor Change

 Description   

The Core API prototype contained a new tool, called drivergen. This tool read in a Go type and produced an operation implementation from it. We originally chose a Go struct as an IDL with struct tags to indicate how to generate the operation.

While this worked it was bulky and required extra fields added to the struct to indicate metadata. Additionally, the original design didn't have the driver.Operation type that handled all of the operation execution, including legacy operation execution. The results, which were not originally planned to be generated are of a known complex type, such as a driver.BatchCursor or are simple enough to generate an IDL.

All this together means we can generate the entire operation. We should swap the Go struct IDL format for a simpler YAML IDL format, which will ensure we can define the operation and its result in a single file. This also allows us to express the necessary information without hacking around Go struct tags.



 Comments   
Comment by Githook User [ 14/May/19 ]

Author:

{'name': 'Kris Brandow', 'username': 'skriptble', 'email': 'kris@mongodb.com'}

Message: Design and implement drivergen

GODRIVER-985
GODRIVER-1009
GODRIVER-1015
GODRIVER-1026

Change-Id: I2e645a7431bd2b96e6ca597c2422082aab351507
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/c930cf205be1acacc05ef342aa0aaf299eb2eb9a

Generated at Thu Feb 08 08:35:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.