CpgLoader

io.shiftleft.codepropertygraph.cpgloading.CpgLoader
object CpgLoader

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CpgLoader.type

Members list

Value members

Concrete methods

def createIndexes(cpg: Cpg): Unit

Create any indexes necessary for quick access.

Create any indexes necessary for quick access.

Value parameters

cpg

the CPG to create indexes in

Attributes

def isFlatgraphFormat(path: Path): Boolean
def isOverflowDbFormat(path: Path): Boolean
def isProtoFormat(path: Path): Boolean

Determine whether the CPG is a legacy (proto) CPG

Determine whether the CPG is a legacy (proto) CPG

Attributes

def isProtoFormat(filename: String): Boolean

Determine whether the CPG is a proto CPG

Determine whether the CPG is a proto CPG

Attributes

def load(filename: String, config: CpgLoaderConfig): Cpg

Load a Code Property Graph

Load a Code Property Graph

Value parameters

config

loader configuration

filename

name of file that stores the code property graph

Attributes

Load Code Property Graph from an overflow DB file

Load Code Property Graph from an overflow DB file

Value parameters

config

loader config This methods loads the CPG from an existing overflow DB file, specified in config.overflowDbConfig. In particular, this config specifies the filename. For example, to load the database at "foo.db", you can issue the following: val odbConfig = Config.withDefaults().withStorageLocation(config.spPath) val config = CpgLoaderConfig().withOverflowConfig(odbConfig) CpgLoader.loadFromOverflowDb(config)

Attributes

def loadFromOverflowDb(path: Path, persistTo: Path): Cpg

Load Code Property Graph from an overflow DB file, by first converting it into a flatgraph binary

Load Code Property Graph from an overflow DB file, by first converting it into a flatgraph binary

Attributes

Deprecated methods

def isLegacyCpg(filename: String): Boolean

Determine whether the CPG is a legacy (proto) CPG

Determine whether the CPG is a legacy (proto) CPG

Attributes

Deprecated
true
def isLegacyCpg(path: Path): Boolean

Determine whether the CPG is a legacy (proto) CPG

Determine whether the CPG is a legacy (proto) CPG

Attributes

Deprecated
true