Pool

Type doc:

A connection pool containing at most 10 connections.

Opening a database connection for each and every operation to the database can quickly become expensive.

A connection pool is a standard technique that can manage opening and re-using connections. Normally it also enforces a maximum number of connections as these are an expensive resource on the database server.

Fields:

Methods:

get_connection: function<Res>(self: Pool , function( Connection ):(Res)):(Res)

Gets a connection from the pool

Parameters:

call_back: The function that will be executed after the connection has been made.

This function receives the connection object, which will be cleaned up after the function has been executed.

A value returned from this function will also be returned by the connect function

help: function(string):(string)