air-sqlite icon indicating copy to clipboard operation
air-sqlite copied to clipboard

Add the ability to pre-create all the SQLConnection objects in the pool

Open probertson opened this issue 15 years ago • 0 comments

Currently the design for the SQLConnection pooling is to use a deferred instantiation model, where SQLConnection objects are only created and added to the pool when they're actually needed (i.e. when a statement execution is requested and there are no SQLConnection objects available).

This could probably be something like this: SQLRunner.initializePool(resultHandler:Function):void;

It could be valuable to have the option of forcing all the SQLConnection objects to be created. This would be useful when you know that at some point you'll need most or all the connections simultaneously, and you have some "idle" time beforehand. (Although other statements could continue to execute while the pool is initializing.)

There would be no benefit to initializing the pool immediately before running a large set of statements.

probertson avatar May 12 '10 16:05 probertson