Documentation
¶
Overview ¶
Package io provides basic tools to read and write graphs from and to files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadIntoGraph ¶
func ReadIntoGraph(ctx context.Context, g storage.Graph, r io.Reader, b literal.Builder) (int, error)
ReadIntoGraph reads a graph out of the provided reader. The data on the reader is interpret as text. Each line represents one triple using the standard serialized format. ReadIntoGraph will stop if fails to Parse a triple on the stream. The triples read till then would have also been added to the graph. The int value returns the number of triples added.
func WriteGraph ¶
WriteGraph serializes the graph into the writer where each triple is marshalled into a separate line. If there is an error writting the serialization will stop. It returns the number of triples serialized regardless if it succeded of it failed partialy.
Types ¶
This section is empty.