persist

Persists the current TranslationResult into a graph database.

This method performs the following actions:

  • Logs information about the number and categories of nodes (e.g., AST nodes, scopes, types, languages) and edges that are being persisted.

  • Collects nodes that include AST nodes, scopes, types, and languages, as well as all associated edges.

  • Persists the collected nodes and edges.

  • Persists additional relationships between nodes, such as those related to types, scopes, and languages.

  • Utilizes a benchmarking mechanism to measure and log the time taken to complete the persistence operation.

This method relies on the following context and properties:

  • The TranslationResult.finalCtx property for accessing the scope manager, type manager, and configuration.

  • A Session context to perform persistence actions.