/demo/src/view-db_test.ads

http://github.com/ThomasLocke/yolk · Ada · 40 lines · 14 code · 7 blank · 19 comment · 0 complexity · 6449a478f2d64f32a195994935bb5e2d MD5 · raw file

  1. -------------------------------------------------------------------------------
  2. -- --
  3. -- Copyright (C) 2010-, Thomas ¸cke --
  4. -- --
  5. -- This is free software; you can redistribute it and/or modify it --
  6. -- under terms of the GNU General Public License as published by the --
  7. -- Free Software Foundation; either version 3, or (at your option) any --
  8. -- later version. This library is distributed in the hope that it will be --
  9. -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
  10. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
  11. -- You should have received a copy of the GNU General Public License and --
  12. -- a copy of the GCC Runtime Library Exception along with this program; --
  13. -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
  14. -- <http://www.gnu.org/licenses/>. --
  15. -- --
  16. -------------------------------------------------------------------------------
  17. -- The dbtest resource.
  18. with AWS.Response;
  19. with AWS.Status;
  20. package View.DB_Test is
  21. type Str_Ptr is access all String;
  22. Names : constant array (Integer range 1 .. 5) of Str_Ptr :=
  23. (1 => new String'("Billy"),
  24. 2 => new String'("David"),
  25. 3 => new String'("Bobby"),
  26. 4 => new String'("Tommy"),
  27. 5 => new String'("Bruce"));
  28. -- Test data to add to the database.
  29. function Generate
  30. (Request : in AWS.Status.Data)
  31. return AWS.Response.Data;
  32. -- Generate the content for the /database resource.
  33. end View.DB_Test;