Comments (2)
The public api is designed so you'll do the right thing by default. In other words, you'll get NodeRefs, because a Call
is a NodeRef:
joern> val call = cpg.call.head
call: Call = Call(
id -> 350254634311902973L,
argumentIndex -> 7,
argumentName -> None,
code -> "pat == null",
columnNumber -> None,
dispatchType -> "STATIC_DISPATCH",
dynamicTypeHintFullName -> ArraySeq(),
lineNumber -> None,
methodFullName -> "<operator>.equals",
name -> "<operator>.equals",
order -> 7,
signature -> "",
typeFullName -> "<empty>"
)
joern> call.isInstanceOf[NodeRef[_]]
res6: Boolean = true
joern> call.isInstanceOf[NodeDb]
res7: Boolean = false
You can pass them around and store them in your maps/lists/whereever, they are just a thin reference to the actual data. What you should not do is hold onto the NodeDb
instance, which you can get via call.get
. On low memory, overflowdb drops the on-heap instance to clear some space, and will use the id from the NodeRef
instance to load it back from disk if required.
The domain specific nodes and edges are generated based on the schema. To see the sources, simply run sbt compile
and have a look in schema/target/scala-3.1.0/src_managed/main/overflowdb-codegen/io/shiftleft/codepropertygraph/generated
from codepropertygraph.
That makes sense, thank you very much!
from codepropertygraph.
Related Issues (20)
- Warnings and crash when using the new C frontend with joern-scan on VLC HOT 9
- Possibly unwanted #ifdef behaviour when running joern-scan with new C frontend HOT 4
- cpgqls python client closes connection before queries finish HOT 1
- Some header files not found with new beta C/C++ frontend HOT 2
- New C frontend: `METHOD` stubs for external methods not present HOT 1
- New C/C++ frontend: missing TYPE nodes for lambdas/template-types
- [ newc ] Type is missing for locals
- newc: signature
- [ newc ] Missing method stub HOT 4
- [newc] Base class in separate namespace not correctly identified
- Missing size of char array in CPG
- Does this tool support generating cpg from java code? HOT 2
- Errors during createAndApply of ParallelCpgPass not escalated HOT 9
- Wrong result for `\\` in the label in the dot file HOT 2
- Some operators have the wrong name (typo) HOT 1
- by using this joern library , i want CPG in ideal format as given in research papers in which CFG and AST nodes must not connected HOT 1
- Can code contain inheritance relationships between classes?
- `sbt package` failing on M1 macOS
- Introduce `POSSIBLE_TYPES` property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codepropertygraph.