Skip to content

Use unique struct comment tag name #44

Description

@ftKnox

It would be beneficial and make it more inline with many other go drivers for other databases to use a unique name for the json marshal/unmarshalling. One specific use case is have a particular field used as a query field but I don't want that field saved to the database. In the example below i may have an http request with "parent_container_id" populated to have it search for a particular container, but I don't need that data saved into arangodb. So currently I am forced to build an additional struct just to omit that field.

type Container {
 ID string `json:"_key"`
}
type Item {
  *Container `json:"container"`
  ParentContainerID string `json:"parent_container_id"`
}

// something like this would be preferable
type Item {
  *Container `json:"container"`
  ParentContainerID string `arangodb:"-" json:"parent_container_id"`
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions