PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/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 Lø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
18--  The dbtest resource.
19
20with AWS.Response;
21with AWS.Status;
22
23package View.DB_Test is
24
25   type Str_Ptr is access all String;
26
27   Names : constant array (Integer range 1 .. 5) of Str_Ptr :=
28             (1 => new String'("Billy"),
29              2 => new String'("David"),
30              3 => new String'("Bobby"),
31              4 => new String'("Tommy"),
32              5 => new String'("Bruce"));
33   --  Test data to add to the database.
34
35   function Generate
36     (Request : in AWS.Status.Data)
37      return AWS.Response.Data;
38   --  Generate the content for the /database resource.
39
40end View.DB_Test;