Add a reference counter in DB.SQLite.Handle
[gnadelite.git] / src / db-tools.ads
blob897bbb92b8931138c8205ba22d3bb3f56ecdc93a
1 ------------------------------------------------------------------------------
2 -- GnadeLite --
3 -- --
4 -- Copyright (C) 2006-2007 --
5 -- Pascal Obry - Olivier Ramonat --
6 -- --
7 -- This library is free software; you can redistribute it and/or modify --
8 -- it under the terms of the GNU General Public License as published by --
9 -- the Free Software Foundation; either version 2 of the License, or (at --
10 -- your option) any later version. --
11 -- --
12 -- This library is distributed in the hope that it will be useful, but --
13 -- WITHOUT ANY WARRANTY; without even the implied warranty of --
14 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
15 -- General Public License for more details. --
16 -- --
17 -- You should have received a copy of the GNU General Public License --
18 -- along with this library; if not, write to the Free Software Foundation, --
19 -- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. --
20 ------------------------------------------------------------------------------
22 with Ada.Strings.Unbounded;
24 package DB.Tools is
26 use Ada.Strings.Unbounded;
28 function F (F : in Float) return String;
29 pragma Inline (F);
30 -- Returns float image
32 function I (Int : in Integer) return String;
33 pragma Inline (I);
34 -- Returns Integer image
36 function Q (Str : in String) return String;
37 pragma Inline (Q);
38 -- Quotes the string and doubles all single quote in Str
39 -- to be able to insert a quote into the database.
40 -- Returns Null if empty string
42 function Q (Str : in Unbounded_String) return String;
43 pragma Inline (Q);
44 -- As above but from an Unbounded_String
46 function Q (Bool : in Boolean) return String;
47 pragma Inline (Q);
48 -- As above but for a boolean
50 end DB.Tools;