Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I reuse a database connection set before initializing a factory class?

0
Posted

How do I reuse a database connection set before initializing a factory class?

0

Each factory class has a variable named database that is set by the initialize function. It contains a database access handle that is reused by all classes of the same component. If you set this variable with a valid database access handle before calling the initialize function, that handle will be reused and the function will not setup a new database access. If you have an application that sets a database connection using Metabase API function MetabaseSetupDatabase, you may use the resulting handle to set the factory class database variable. You may also use the value of the database variable of of factory class to set the same variable of another factory class before calling its initialize function. • How do I set an optional reference variable to not point to any object? If you have class with a reference variable that may or may not point to an object of another class, just call the respective setreference type of variable to passing null in the place of the referenced object argum

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123