1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- SQL Database Access -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 2011-2013, Vadim Godunko <vgodunko@gmail.com> -- 12-- All rights reserved. -- 13-- -- 14-- Redistribution and use in source and binary forms, with or without -- 15-- modification, are permitted provided that the following conditions -- 16-- are met: -- 17-- -- 18-- * Redistributions of source code must retain the above copyright -- 19-- notice, this list of conditions and the following disclaimer. -- 20-- -- 21-- * Redistributions in binary form must reproduce the above copyright -- 22-- notice, this list of conditions and the following disclaimer in the -- 23-- documentation and/or other materials provided with the distribution. -- 24-- -- 25-- * Neither the name of the Vadim Godunko, IE nor the names of its -- 26-- contributors may be used to endorse or promote products derived from -- 27-- this software without specific prior written permission. -- 28-- -- 29-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- 30-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- 31-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- 32-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- 33-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- 34-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- 35-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- 36-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- 37-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- 38-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- 39-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- 40-- -- 41------------------------------------------------------------------------------ 42-- $Revision: 3757 $ $Date: 2013-02-11 11:00:53 +0400 (Mon, 11 Feb 2013) $ 43------------------------------------------------------------------------------ 44 45package body Matreshka.Internals.SQL_Drivers.Dummy is 46 47 ----------------- 48 -- Bound_Value -- 49 ----------------- 50 51 overriding function Bound_Value 52 (Self : not null access Dummy_Query; 53 Name : League.Strings.Universal_String) 54 return League.Holders.Holder 55 is 56 pragma Unreferenced (Self); 57 pragma Unreferenced (Name); 58 59 begin 60 return League.Holders.Empty_Holder; 61 end Bound_Value; 62 63 ------------------- 64 -- Error_Message -- 65 ------------------- 66 67 overriding function Error_Message 68 (Self : not null access Dummy_Database) 69 return League.Strings.Universal_String 70 is 71 pragma Unreferenced (Self); 72 73 begin 74 return League.Strings.To_Universal_String ("Database driver not defined"); 75 end Error_Message; 76 77 ------------------- 78 -- Error_Message -- 79 ------------------- 80 81 overriding function Error_Message 82 (Self : not null access Dummy_Query) 83 return League.Strings.Universal_String 84 is 85 pragma Unreferenced (Self); 86 87 begin 88 return League.Strings.To_Universal_String ("Database driver not defined"); 89 end Error_Message; 90 91 ------------- 92 -- Execute -- 93 ------------- 94 95 overriding function Execute 96 (Self : not null access Dummy_Query) return Boolean 97 is 98 pragma Unreferenced (Self); 99 100 begin 101 return False; 102 end Execute; 103 104 --------------- 105 -- Is_Active -- 106 --------------- 107 108 overriding function Is_Active 109 (Self : not null access Dummy_Query) return Boolean 110 is 111 pragma Unreferenced (Self); 112 113 begin 114 return False; 115 end Is_Active; 116 117 -------------- 118 -- Is_Valid -- 119 -------------- 120 121 overriding function Is_Valid 122 (Self : not null access Dummy_Query) return Boolean 123 is 124 pragma Unreferenced (Self); 125 126 begin 127 return False; 128 end Is_Valid; 129 130 ---------- 131 -- Next -- 132 ---------- 133 134 overriding function Next 135 (Self : not null access Dummy_Query) return Boolean 136 is 137 pragma Unreferenced (Self); 138 139 begin 140 return False; 141 end Next; 142 143 ---------- 144 -- Open -- 145 ---------- 146 147 overriding function Open 148 (Self : not null access Dummy_Database; 149 Options : SQL.Options.SQL_Options) return Boolean 150 is 151 pragma Unreferenced (Self); 152 pragma Unreferenced (Options); 153 154 begin 155 return False; 156 end Open; 157 158 ------------- 159 -- Prepare -- 160 ------------- 161 162 overriding function Prepare 163 (Self : not null access Dummy_Query; 164 Query : League.Strings.Universal_String) return Boolean 165 is 166 pragma Unreferenced (Self); 167 pragma Unreferenced (Query); 168 169 begin 170 return False; 171 end Prepare; 172 173 ----------- 174 -- Query -- 175 ----------- 176 177 overriding function Query 178 (Self : not null access Dummy_Database) return not null Query_Access 179 is 180 pragma Unreferenced (Self); 181 182 begin 183 return Empty_Query'Access; 184 end Query; 185 186 ----------- 187 -- Value -- 188 ----------- 189 190 overriding function Value 191 (Self : not null access Dummy_Query; 192 Index : Positive) return League.Holders.Holder 193 is 194 pragma Unreferenced (Self); 195 pragma Unreferenced (Index); 196 197 begin 198 return League.Holders.Empty_Holder; 199 end Value; 200 201end Matreshka.Internals.SQL_Drivers.Dummy; 202