with Queries;               use Queries;
with ORM_Database;          use ORM_Database;
with GNATCOLL.SQL.Sessions; use GNATCOLL.SQL.Sessions;
with Ada.Text_IO;           use Ada.Text_IO;

procedure Main is
   Session : Session_Type;
begin
   declare
      S : constant Detached_Staff'Class :=
         Get_Staff (Session, Id => 0);
   begin
      Put_Line (S.Id'Img & " " & S.Name);
   end;

   declare
      M : constant Staff_Managers := All_Staff.Filter (Name => "foo");
      L : constant Staff_List := M.Get (Session);
      S : constant Queries.Staff'Class := L.Element;
   begin
      Put_Line (S.Id'Img & " " & S.Name);
   end;

   declare
      M : constant Active_Staff_Managers :=
         All_Active_Staff.Filter (Name => "foo");
      L : constant Active_Staff_List := M.Get (Session);
      S : constant Queries.Active_Staff'Class := L.Element;
   begin
      Put_Line (S.Id'Img & " " & S.Name);
   end;
end Main;
