INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Kind of QUERY which incapsulates SQL INSERT 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_INSERT
inherit

QUERY
rename
insert as string_insert
redefine
is_ready_for_execution,
reconstruct
end
creation

attach,
compose,
insert,
insert_into
feature -- Sections contents:

insert_section: STRING

columns_section: STRING

values_section: ARRAY [ANY]
feature -- Sections contents setting:

compose (i, c: STRING; v: ARRAY [ANY])
-- creation procedure; allows to create simple SQL INSERT
-- statement that consist only of the INSERT INTO, columns
-- and VALUES sections
require
valid_string: i /= void and then not i.is_empty and then c /= void
valid_array: v /= void and then v.count > 0

insert, insert_into (s: STRING)
-- string 's' is a table's name
require
valid_string: s /= void and then not s.is_empty

columns (s: STRING)
-- columns list that defines the VALUES section structure
require
valid_string: s /= void

values (a: ARRAY [ANY])
-- this method assigns a new contents of VALUES section
require
valid_array: a /= void and then a.count > 0
feature -- Query:

is_ready_for_execution: BOOLEAN
-- redefined from SIMPLE_QUERY
end -- class SQL_INSERT

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES