0 votes
71 views

Hello everyone,

I am currently working with the openLCA API and have run into a specific challenge. Normally, when you use the openLCA API to create product systems or processes, these objects are automatically saved in the openLCA database. This is evident when you refresh the navigation in the openLCA client and see the newly created entities.

However, my needs are different. I want to dynamically create these product systems and processes at runtime within my code, but I do not want them to be automatically committed to the openLCA database. My goal is to manage these objects entirely in memory or within a temporary context, essentially replicating openLCA's functionality without permanent changes to the database.

I have two main questions:

  1. Is it possible to configure the openLCA API such that objects are created and manipulated without being persisted in the database?
  2. If the API does not natively support this functionality, what alternative approaches would you suggest for achieving it? Would setting up a temporary or in-memory database, or possibly intercepting API calls to block database commits, be viable solutions?
in openLCA by (120 points)

1 Answer

0 votes
by (2.9k points)

Hi elicep01,

You can, of course, create or use data sets and manipulate them without putting them in the database. If you are not using client.put or client.calculate, nothing should be written or updated on your database. 

This means that you cannot run calculations without updating the database. The reason for that is that the calculation engine has to interact with the database to provides results.

If you could provide more information about what you would like to do, it will be easier to find solutions. ;)

Regards,

Fran├žois

...