Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
Public Member Functions | Static Public Member Functions | List of all members
graphar::VertexPropertyChunkInfoReader Class Reference

#include <chunk_info_reader.h>

Public Member Functions

 VertexPropertyChunkInfoReader (const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::string &prefix)
 Initialize the VertexPropertyChunkInfoReader. More...
 
Status seek (IdType id)
 Sets chunk position indicator for reader by internal vertex id. If internal vertex id is not found, will return Status::IndexError error. After seeking to an invalid vertex id, the next call to GetChunk function may undefined, e.g. return an non exist path. More...
 
Result< std::string > GetChunk () const
 Return the current chunk file path of chunk position indicator.
 
Status next_chunk ()
 
IdType GetChunkNum () const noexcept
 

Static Public Member Functions

static Result< std::shared_ptr< VertexPropertyChunkInfoReader > > Make (const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::string &prefix)
 Create a VertexPropertyChunkInfoReader instance from vertex info. More...
 
static Result< std::shared_ptr< VertexPropertyChunkInfoReader > > Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &label, const std::shared_ptr< PropertyGroup > &property_group)
 Create a VertexPropertyChunkInfoReader instance from graph info and property group. More...
 
static Result< std::shared_ptr< VertexPropertyChunkInfoReader > > Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &label, const std::string &property_name)
 Create a VertexPropertyChunkInfoReader instance from graph info and property name. More...
 

Detailed Description

The chunk info reader for vertex property group.

Definition at line 31 of file chunk_info_reader.h.

Constructor & Destructor Documentation

◆ VertexPropertyChunkInfoReader()

graphar::VertexPropertyChunkInfoReader::VertexPropertyChunkInfoReader ( const std::shared_ptr< VertexInfo > &  vertex_info,
const std::shared_ptr< PropertyGroup > &  property_group,
const std::string &  prefix 
)
explicit

Initialize the VertexPropertyChunkInfoReader.

Parameters
vertex_infoThe vertex info that describes the vertex type.
property_groupThe property group that describes the property group.
prefixThe absolute prefix of the graph.

Definition at line 33 of file chunk_info_reader.cc.

Member Function Documentation

◆ GetChunkNum()

IdType graphar::VertexPropertyChunkInfoReader::GetChunkNum ( ) const
inlinenoexcept

Get the chunk number of the current vertex property group.

Definition at line 71 of file chunk_info_reader.h.

◆ Make() [1/3]

Result< std::shared_ptr< VertexPropertyChunkInfoReader > > graphar::VertexPropertyChunkInfoReader::Make ( const std::shared_ptr< GraphInfo > &  graph_info,
const std::string &  label,
const std::shared_ptr< PropertyGroup > &  property_group 
)
static

Create a VertexPropertyChunkInfoReader instance from graph info and property group.

Parameters
graph_infoThe graph info.
labelThe vertex label.
property_groupThe property group of the vertex property.

Definition at line 87 of file chunk_info_reader.cc.

◆ Make() [2/3]

Result< std::shared_ptr< VertexPropertyChunkInfoReader > > graphar::VertexPropertyChunkInfoReader::Make ( const std::shared_ptr< GraphInfo > &  graph_info,
const std::string &  label,
const std::string &  property_name 
)
static

Create a VertexPropertyChunkInfoReader instance from graph info and property name.

Parameters
graph_infoThe graph info.
labelThe vertex label.
property_nameThe name of one property in the property group you want to read.

Definition at line 98 of file chunk_info_reader.cc.

◆ Make() [3/3]

Result< std::shared_ptr< VertexPropertyChunkInfoReader > > graphar::VertexPropertyChunkInfoReader::Make ( const std::shared_ptr< VertexInfo > &  vertex_info,
const std::shared_ptr< PropertyGroup > &  property_group,
const std::string &  prefix 
)
static

Create a VertexPropertyChunkInfoReader instance from vertex info.

Parameters
vertex_infoThe vertex info.
property_groupThe property group of the vertex property.
prefixThe absolute prefix of the graph.

Definition at line 78 of file chunk_info_reader.cc.

◆ next_chunk()

Status graphar::VertexPropertyChunkInfoReader::next_chunk ( )

Sets chunk position indicator to next chunk.

if current chunk is the last chunk, will return Status::IndexError error.

Definition at line 68 of file chunk_info_reader.cc.

◆ seek()

Status graphar::VertexPropertyChunkInfoReader::seek ( IdType  id)

Sets chunk position indicator for reader by internal vertex id. If internal vertex id is not found, will return Status::IndexError error. After seeking to an invalid vertex id, the next call to GetChunk function may undefined, e.g. return an non exist path.

Parameters
idthe internal vertex id.

Definition at line 52 of file chunk_info_reader.cc.


The documentation for this class was generated from the following files: