Guest User

Untitled

a guest
Feb 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.76 KB | None | 0 0
  1. with gnatcoll.sql.Exec;
  2.  
  3.  
  4. private
  5. with gnatcoll.sql.postgres;
  6.  
  7.  
  8.  
  9. package db_connection_pool
  10. is
  11.  
  12.    function  fetch return gnatcoll.sql.Exec.Database_Connection;
  13.    procedure free (the_Connection : in gnatcoll.sql.Exec.Database_Connection);
  14.  
  15.    
  16.    
  17.    
  18.    
  19. private
  20.  
  21.    type Database_Connections is array (1 .. 200) of gnatcoll.sql.Exec.Database_Connection;
  22.  
  23.  
  24.    
  25.    protected
  26.    safe_Connections
  27.    is
  28.       procedure fetch (new_Connection :     out gnatcoll.sql.Exec.Database_Connection);
  29.       procedure free  (the_Connection : in      gnatcoll.sql.Exec.Database_Connection);
  30.      
  31.    private
  32.       Available      : Database_Connections;
  33.       next_Available : Natural             := 0;
  34.    end safe_Connections;
  35.  
  36.  
  37.  
  38. end db_connection_pool;
Add Comment
Please, Sign In to add comment