Documentation ¶
Overview ¶
Package storage provides type definition for managing OBO graphs in a persistent storage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource interface { // SaveOboGraphInfo perist OBO graphs metadata in the storage SaveOboGraphInfo(graph.OboGraph) error // UpdateOboGraphInfo update OBO graph metadata in the storage UpdateOboGraphInfo(graph.OboGraph) error // ExistOboGraph checks for existence of a particular OBO graph ExistsOboGraph(graph.OboGraph) bool // SaveTerms persist all terms in the storage SaveTerms(graph.OboGraph) (int, error) // UpdateTerms update existing terms in the storage UpdateTerms(graph.OboGraph) (int, error) // SaveorUpdateTerms either insert and update terms in the storage SaveOrUpdateTerms(graph.OboGraph) (*Stats, error) // SaveRelationships persist all relationships in the storage SaveRelationships(graph.OboGraph) (int, error) // SaveNewRelationships skips the existing one and saves only the new relationships SaveNewRelationships(graph.OboGraph) (int, error) }
DataSource represents interface for storing and retrieving OBO graphs.
type UploadInformation ¶ added in v1.4.0
type UploadInformation struct { // IsCreated indicates whether the obo information is created or updated IsCreated bool // RelationStats gives no of relationships that are created RelationStats int // TermStats gives information about uploaded terms TermStats *Stats }
UploadInformation gives information about obo upload.
func LoadOboJSONFromDataSource ¶ added in v1.4.0
func LoadOboJSONFromDataSource(r io.Reader, dsr DataSource) (*UploadInformation, error)
LoadOboJSONFromDataSource loads obojson from a given reader and datasource for storage.
Click to show internal directories.
Click to hide internal directories.