INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Kind of QUERY which incapsulates SQL DELETE statement"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: dale
class SQL_DELETE
inherit

QUERY
redefine
reconstruct
end
creation

attach,
compose,
delete,
delete_from,
from_
feature -- Sections contents:

delete_section: STRING

where_section: STRING
feature -- Sections contents setting:

compose (d, w: STRING)
-- creation procedure; allows to create simple SQL DELETE
-- statement that consist only of the DELETE FROM and WHERE
-- sections
require
valid_strings: d /= void and then not d.is_empty and w /= void

delete, delete_from, from_ (s: STRING)
-- string 's' is the table's name
require
valid_string: s /= void and then not s.is_empty

where (s: STRING)
-- string 's' is the contents of the WHERE section
require
valid_string: s /= void

and_where (s: STRING)
-- this method assigns a new part of the WHERE section,
-- merging it with the previous one via AND
require
valid_string: s /= void

or_where (s: STRING)
-- this method assigns a new part of the WHERE section,
-- merging it with the previous one via OR
require
valid_string: s /= void
end -- class SQL_DELETE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES