INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Base class for all queries"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: dale
deferred class SIMPLE_QUERY
inherit

ODBC_ELEMENT
rename
parent as database
redefine
attach,
database
end
feature -- Attributes:

options: QUERY_OPTIONS

database: DATABASE
feature -- Commands:

attach (prnt: DATABASE)
-- ...

execute
-- execute this query on attached database
require
attached: is_attached
ready: is_ready_for_execution

execute_on (db: DATABASE)
-- attach to database and execute this query on it

discard_results
-- discard pending results and kill recordset if any
require
attached: is_attached

relax
-- simply discard all results
require
attached: is_attached
feature -- Queries:

recordset: RECORDSET
-- recordset as a result of execution
require
attached: is_attached
feature -- * Advanced attribute:

type: INTEGER
feature -- * Advanced commands:

cancel
-- cancel execution or data-at-execution parameters passing
require
attached: is_attached
feature -- * Advanced queries:

is_active: BOOLEAN
-- redefined from ODBC_ELEMENT; are there any results pending?

no_columns: INTEGER
-- returns a number of columns in the resultset, if any
require
attached: is_attached
ensure
valid_answer: Result >= 0

affected_rows: INTEGER
-- returns a number of the rows were affected by this query
-- it may return -1 if the request is currently not applicable
require
attached: is_attached
ensure
valid_answer: Result = -1 or else Result >= 0

is_ready_for_execution: BOOLEAN
-- returns True if this query is currently ready to be executed
-- default value is True
end -- class SIMPLE_QUERY

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES