INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Represents the notion of RECORDSET%'s record"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: dale
class RECORD
inherit

FIELDS
redefine
make,
out
end
creation

make
creation {RECORDSET}

from_fields,
from_resultset
feature -- Attribute:

that_field: FIELD
feature -- Command:

make (db: DATABASE)
-- creation procedure; redefined from FIELDS
feature -- Integrity checking:

is_valid: BOOLEAN
-- this feature should be normally redefined to return
-- True if and only if this record is valid
-- note: by default returns True
feature -- Queries:

field (s: STRING): FIELD
-- returns first field having the specified name
require
valid_string: s /= void and then not s.is_empty
ensure
not_void: Result /= void

field_no (k: INTEGER): FIELD
-- returns the field having the specified index
require
index_in_bounds: 1 <= k and then k <= count
ensure
not_void: Result /= void

field_at (cs: CURSOR_): FIELD
-- returns the field pointed by the specified cursor
require
proper_cursor: is_inside (cs)
ensure
not_void: Result /= void

out: STRING
-- redefined from ANY
feature {RECORDSET, RECORDS_TRACK}

from_resultset (q: SIMPLE_QUERY)
-- creation procedure; makes the catalog of resultset's fields
require
valid_query: q /= void and then q.is_attached
feature {NONE}

from_fields (fs1, fs2: FIELDS)
-- build this record on the basis of one or two field sets
-- the 'fs1' is basic set; the 'fs2' is correcting set
require
first_not_void: fs1 /= void and then fs1.is_attached
fields_correlated: fs2 /= void implies fs1.count = fs2.count
end -- class RECORD

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES