indexing
	description: "Implementation of DB_REPOSITORY"
	legal: "See notice at end of class."
	status: "See notice at end of class."
	date: "$Date: 2006-01-22 18:25:44 -0800 (Sun, 22 Jan 2006) $"
	revision: "$Revision: 56675 $"

class interface
	DATABASE_REPOSITORY [reference G -> DATABASE create default_create end]

create 
	make
			-- Create attributes

feature -- Initialization

	load
			-- Load in description of repository repository_name.
		require else
			repository_name_exists: repository_name /= Void

	make
			-- Create attributes
	
feature -- Access

	bit_type: INTEGER_32 is 8
			-- (from INTERNAL)

	boolean_field (i: INTEGER_32; object: ANY): BOOLEAN
			-- Boolean value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			boolean_field: field_type (i, object) = boolean_type

	boolean_type: INTEGER_32 is 3
			-- (from INTERNAL)

	character_32_type: INTEGER_32 is 12
			-- Was declared in INTERNAL as synonym of Wide_character_type.
			-- (from INTERNAL)

	character_8_type: INTEGER_32 is 2
			-- Was declared in INTERNAL as synonym of Character_type.
			-- (from INTERNAL)

	character_field (i: INTEGER_32; object: ANY): CHARACTER_8
			-- Character value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			character_field: field_type (i, object) = character_type

	character_type: INTEGER_32 is 2
			-- Was declared in INTERNAL as synonym of Character_8_type.
			-- (from INTERNAL)

	check_instruction: INTEGER_32 is 7
			-- Exception code for violated check
			-- (from EXCEP_CONST)

	class_invariant: INTEGER_32 is 6
			-- Exception code for violated class invariant
			-- (from EXCEP_CONST)

	class_name (object: ANY): STRING_8
			-- Name of the class associated with `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void

	class_name_of_type (type_id: INTEGER_32): STRING_8
			-- Name of class associated with dynamic type `type_id'.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	com_exception: INTEGER_32 is 28
			-- Exception code for a COM error.
			-- (from EXCEP_CONST)

	create_on_deferred: INTEGER_32 is 17
			-- Create on deferred
			-- (from EXCEP_CONST)

	db_spec: DATABASE
			-- Handle to actual database
			-- (from HANDLE_SPEC)
		ensure -- from HANDLE_SPEC
			not_void: Result /= Void

	developer_exception: INTEGER_32 is 24
			-- Exception code for developer exception
			-- (from EXCEP_CONST)

	dollar_applied_to_melted_feature: INTEGER_32 is 26
			-- $ applied to melted feature
			-- (from EXCEP_CONST)

	double_field (i: INTEGER_32; object: ANY): REAL_64
			-- Double precision value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of real_64_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_64_field: field_type (i, object) = real_64_type

	double_type: INTEGER_32 is 6
			-- Was declared in INTERNAL as synonym of Real_64_type.
			-- (from INTERNAL)

	dynamic_type (object: ANY): INTEGER_32
			-- Dynamic type of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
		ensure -- from INTERNAL
			dynamic_type_nonnegative: Result >= 0

	eiffel_runtime_fatal_error: INTEGER_32 is 25
			-- Eiffel run-time fatal error
			-- (from EXCEP_CONST)

	eiffel_runtime_panic: INTEGER_32 is 13
			-- Eiffel run-time panic
			-- (from EXCEP_CONST)

	exception_in_signal_handler: INTEGER_32 is 20
			-- Exception in signal handler
			-- (from EXCEP_CONST)

	expanded_field_type (i: INTEGER_32; object: ANY): STRING_8
			-- Class name associated with the `i'-th
			-- expanded field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			is_expanded: field_type (i, object) = expanded_type
		ensure -- from INTERNAL
			result_exists: Result /= Void

	expanded_type: INTEGER_32 is 7
			-- (from INTERNAL)

	external_exception: INTEGER_32 is 18
			-- Exception code for operating system error
			-- which does not set the `errno' variable
			-- (Unix-specific)
			-- (from EXCEP_CONST)

	field (i: INTEGER_32; object: ANY): ANY
			-- Object attached to the `i'-th field of `object'
			-- (directly or through a reference)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			not_special: not is_special (object)

	field_name (i: INTEGER_32; object: ANY): STRING_8
			-- Name of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			not_special: not is_special (object)
		ensure -- from INTERNAL
			result_exists: Result /= Void

	field_name_of_type (i: INTEGER_32; type_id: INTEGER_32): STRING_8
			-- Name of `i'-th field of dynamic type `type_id'.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0
			index_large_enough: i >= 1
			index_small_enought: i <= field_count_of_type (type_id)

	field_offset (i: INTEGER_32; object: ANY): INTEGER_32
			-- Offset of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			not_special: not is_special (object)

	field_static_type_of_type (i: INTEGER_32; type_id: INTEGER_32): INTEGER_32
			-- Static type of declared `i'-th field of dynamic type `type_id'
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0
			index_large_enough: i >= 1
			index_small_enough: i <= field_count_of_type (type_id)
		ensure -- from INTERNAL
			field_type_nonnegative: Result >= 0

	field_type (i: INTEGER_32; object: ANY): INTEGER_32
			-- Abstract type of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
		ensure -- from INTERNAL
			field_type_nonnegative: Result >= 0

	field_type_of_type (i: INTEGER_32; type_id: INTEGER_32): INTEGER_32
			-- Abstract type of `i'-th field of dynamic type `type_id'
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0
			index_large_enough: i >= 1
			index_small_enough: i <= field_count_of_type (type_id)
		ensure -- from INTERNAL
			field_type_nonnegative: Result >= 0

	floating_point_exception: INTEGER_32 is 5
			-- Exception code for floating point exception
			-- (from EXCEP_CONST)

	generating_type: STRING_8
			-- Name of current object's generating type
			-- (type of which it is a direct instance)
			-- (from ANY)

	generator: STRING_8
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
			-- (from ANY)

	generic_count (obj: ANY): INTEGER_32
			-- Number of generic parameter in `obj'.
			-- (from INTERNAL)
		require -- from INTERNAL
			obj_not_void: obj /= Void

	generic_count_of_type (type_id: INTEGER_32): INTEGER_32
			-- Number of generic parameter in `type_id'.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	generic_dynamic_type (object: ANY; i: INTEGER_32): INTEGER_32
			-- Dynamic type of generic parameter of `object' at
			-- position `i'.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			object_generic: generic_count (object) > 0
			i_valid: i > 0 and i <= generic_count (object)
		ensure -- from INTERNAL
			dynamic_type_nonnegative: Result >= 0

	generic_dynamic_type_of_type (type_id: INTEGER_32; i: INTEGER_32): INTEGER_32
			-- Dynamic type of generic parameter of `type_id' at position `i'.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0
			type_id_generic: generic_count_of_type (type_id) > 0
			i_valid: i > 0 and i <= generic_count_of_type (type_id)
		ensure -- from INTERNAL
			dynamic_type_nonnegative: Result >= 0

	incorrect_inspect_value: INTEGER_32 is 9
			-- Exception code for inspect value which is not one
			-- of the inspect constants, if there is no Else_part
			-- (from EXCEP_CONST)

	integer_16_field (i: INTEGER_32; object: ANY): INTEGER_16
			-- INTEGER_16 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_16_field: field_type (i, object) = integer_16_type

	integer_16_type: INTEGER_32 is 10
			-- (from INTERNAL)

	integer_32_field (i: INTEGER_32; object: ANY): INTEGER_32
			-- INTEGER_32 value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of integer_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_32_field: field_type (i, object) = integer_32_type

	integer_32_type: INTEGER_32 is 4
			-- Was declared in INTERNAL as synonym of Integer_type.
			-- (from INTERNAL)

	integer_64_field (i: INTEGER_32; object: ANY): INTEGER_64
			-- INTEGER_64 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_64_field: field_type (i, object) = integer_64_type

	integer_64_type: INTEGER_32 is 11
			-- (from INTERNAL)

	integer_8_field (i: INTEGER_32; object: ANY): INTEGER_8
			-- INTEGER_8 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_8_field: field_type (i, object) = integer_8_type

	integer_8_type: INTEGER_32 is 9
			-- (from INTERNAL)

	integer_field (i: INTEGER_32; object: ANY): INTEGER_32
			-- INTEGER_32 value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of integer_32_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_32_field: field_type (i, object) = integer_32_type

	integer_type: INTEGER_32 is 4
			-- Was declared in INTERNAL as synonym of Integer_32_type.
			-- (from INTERNAL)

	io_exception: INTEGER_32 is 21
			-- Exception code for I/O error
			-- (from EXCEP_CONST)

	loop_invariant: INTEGER_32 is 11
			-- Exception code for violated loop invariant
			-- (from EXCEP_CONST)

	loop_variant: INTEGER_32 is 10
			-- Exception code for non-decreased loop variant
			-- (from EXCEP_CONST)

	max_predefined_type: INTEGER_32 is 16
			-- (from INTERNAL)

	natural_16_field (i: INTEGER_32; object: ANY): NATURAL_16
			-- NATURAL_16 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_16_field: field_type (i, object) = natural_16_type

	natural_16_type: INTEGER_32 is 14
			-- (from INTERNAL)

	natural_32_field (i: INTEGER_32; object: ANY): NATURAL_32
			-- NATURAL_32 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_32_field: field_type (i, object) = natural_32_type

	natural_32_type: INTEGER_32 is 15
			-- (from INTERNAL)

	natural_64_field (i: INTEGER_32; object: ANY): NATURAL_64
			-- NATURAL_64 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_64_field: field_type (i, object) = natural_64_type

	natural_64_type: INTEGER_32 is 16
			-- (from INTERNAL)

	natural_8_field (i: INTEGER_32; object: ANY): NATURAL_8
			-- NATURAL_8 value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_8_field: field_type (i, object) = natural_8_type

	natural_8_type: INTEGER_32 is 13
			-- (from INTERNAL)

	no_more_memory: INTEGER_32 is 2
			-- Exception code for failed memory allocation
			-- (from EXCEP_CONST)

	none_type: INTEGER_32 is -2
			-- Type ID representation for NONE.
			-- (from INTERNAL)

	number_of_codes: INTEGER_32 is 29
			-- How many codes are there to represent exceptions?
			-- (from EXCEP_CONST)

	operating_system_exception: INTEGER_32 is 22
			-- Exception code for operating system error
			-- which sets the `errno' variable
			-- (Unix-specific)
			-- (from EXCEP_CONST)

	out_of_memory: INTEGER_32 is 15
			-- Out of memory (cannot be ignored)
			-- (from EXCEP_CONST)

	pointer_field (i: INTEGER_32; object: ANY): POINTER
			-- Pointer value of `i'-th field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			pointer_field: field_type (i, object) = pointer_type

	pointer_type: INTEGER_32 is 0
			-- (from INTERNAL)

	postcondition: INTEGER_32 is 4
			-- Exception code for violated postcondition
			-- (from EXCEP_CONST)

	precondition: INTEGER_32 is 3
			-- Exception code for violated precondition
			-- (from EXCEP_CONST)

	real_32_field (i: INTEGER_32; object: ANY): REAL_32
			-- Real value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of real_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_32_field: field_type (i, object) = real_32_type

	real_32_type: INTEGER_32 is 5
			-- Was declared in INTERNAL as synonym of Real_type.
			-- (from INTERNAL)

	real_64_field (i: INTEGER_32; object: ANY): REAL_64
			-- Double precision value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of double_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_64_field: field_type (i, object) = real_64_type

	real_64_type: INTEGER_32 is 6
			-- Was declared in INTERNAL as synonym of Double_type.
			-- (from INTERNAL)

	real_field (i: INTEGER_32; object: ANY): REAL_32
			-- Real value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of real_32_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_32_field: field_type (i, object) = real_32_type

	real_type: INTEGER_32 is 5
			-- Was declared in INTERNAL as synonym of Real_32_type.
			-- (from INTERNAL)

	reference_type: INTEGER_32 is 1
			-- (from INTERNAL)

	rescue_exception: INTEGER_32 is 14
			-- Exception code for exception in rescue clause
			-- (from EXCEP_CONST)

	resumption_failed: INTEGER_32 is 16
			-- Resumption failed (retry did not succeed)
			-- (from EXCEP_CONST)

	retrieve_exception: INTEGER_32 is 23
			-- Exception code for retrieval error
			-- may be raised by `retrieved' in `IO_MEDIUM'.
			-- (from EXCEP_CONST)

	routine_failure: INTEGER_32 is 8
			-- Exception code for failed routine
			-- (from EXCEP_CONST)

	runtime_check_exception: INTEGER_32 is 29
			-- Exception code for runtime check being violated.
			-- (from EXCEP_CONST)

	runtime_io_exception: INTEGER_32 is 27
			-- Exception code for I/O error raised by runtime functions
			-- such as store/retrieve, file access...
			-- (from EXCEP_CONST)

	signal_exception: INTEGER_32 is 12
			-- Exception code for operating system signal
			-- (from EXCEP_CONST)

	type_name (object: ANY): STRING_8
			-- Name of `object''s generating type (type of which `object'
			-- is a direct instance).
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void

	type_name_of_type (type_id: INTEGER_32): STRING_8
			-- Name of `type_id''s generating type (type of which `type_id'
			-- is a direct instance).
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	valid_code (c: INTEGER_32): BOOLEAN
			-- Is `c' a valid code to represent some kind of exceptions?
			-- (from EXCEP_CONST)

	void_assigned_to_expanded: INTEGER_32 is 19
			-- Exception code for assignment of void value
			-- to expanded entity
			-- (from EXCEP_CONST)

	void_call_target: INTEGER_32 is 1
			-- Exception code for feature applied to void reference
			-- (from EXCEP_CONST)

	wide_character_type: INTEGER_32 is 12
			-- Was declared in INTERNAL as synonym of Character_32_type.
			-- (from INTERNAL)
	
feature -- Measurement

	bit_size (i: INTEGER_32; object: ANY): INTEGER_32
			-- Size (in bit) of the `i'-th bit field of `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			is_bit: field_type (i, object) = bit_type
		ensure -- from INTERNAL
			positive_result: Result > 0

	field_count (object: ANY): INTEGER_32
			-- Number of logical fields in `object'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void

	field_count_of_type (type_id: INTEGER_32): INTEGER_32
			-- Number of logical fields in dynamic type `type_id'.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	physical_size (object: ANY): INTEGER_32
			-- Space occupied by `object' in bytes
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
	
feature -- Comparison

	frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void
			-- or attached to isomorphic object structures?
			-- (from ANY)
		ensure -- from ANY
			shallow_implies_deep: standard_equal (some, other) implies Result
			both_or_none_void: (some = Void) implies (Result = (other = Void))
			same_type: (Result and (some /= Void)) implies some.same_type (other)
			symmetric: Result implies deep_equal (other, some)

	frozen equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void or attached
			-- to objects considered equal?
			-- (from ANY)
		ensure -- from ANY
			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))

	is_equal (other: like Current): BOOLEAN
			-- Is `other' attached to an object considered
			-- equal to current object?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			symmetric: Result implies other.is_equal (Current)
			consistent: standard_is_equal (other) implies Result

	frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void or attached to
			-- field-by-field identical objects of the same type?
			-- Always uses default object comparison criterion.
			-- (from ANY)
		ensure -- from ANY
			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))

	frozen standard_is_equal (other: like Current): BOOLEAN
			-- Is `other' attached to an object of the same type
			-- as current object, and field-by-field identical to it?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			same_type: Result implies same_type (other)
			symmetric: Result implies other.standard_is_equal (Current)
	
feature -- Status report

	assertion_violation: BOOLEAN
			-- Is last exception originally due to a violated
			-- assertion or non-decreasing variant?
			-- (from EXCEPTIONS)

	exceptions_class_name: STRING_8
			-- Name of the class that includes the recipient
			-- of original form of last exception
			-- (from EXCEPTIONS)

	column_i_th (i: INTEGER_32): COLUMNS [DATABASE]
			-- Column corresponding to indice 'i'.
		require
			indice_valid: i >= 1 and i <= column_number
		ensure
			Result /= Void

	column_name (i: INTEGER_32): STRING_8
			-- Name of i-th column of table-like repository.
		require else
			repository_exists: exists
			good_position: 0 < i and i <= dimension

	column_number: INTEGER_32
			-- Column Number.
		ensure
			Result >= 0

	conforms (object: ANY): BOOLEAN
			-- Is the structure of repository_name the same
			-- as the structure of `object'.
		require else
			object_exists: object /= Void

	conforms_to (other: ANY): BOOLEAN
			-- Does type of current object conform to type
			-- of `other' (as per Eiffel: The Language, chapter 13)?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void

	developer_exception_name: STRING_8
			-- Name of last developer-raised exception
			-- (from EXCEPTIONS)
		require -- from EXCEPTIONS
			applicable: is_developer_exception

	dimension: INTEGER_32
			-- Table column count.
		require else
			repository_exists: exists

	exception: INTEGER_32
			-- Code of last exception that occurred
			-- (from EXCEPTIONS)

	exception_trace: STRING_8
			-- String representation of the exception trace
			-- (from EXCEPTIONS)

	exists: BOOLEAN
			-- Does current repository exist in database schema?

	is_developer_exception: BOOLEAN
			-- Is the last exception originally due to
			-- a developer exception?
			-- (from EXCEPTIONS)

	is_developer_exception_of_name (name: STRING_8): BOOLEAN
			-- Is the last exception originally due to a developer
			-- exception of name `name'?
			-- (from EXCEPTIONS)

	is_marked (obj: ANY): BOOLEAN
			-- Is `obj' marked?
			-- (from INTERNAL)
		require -- from INTERNAL
			object_exists: obj /= Void

	is_pre_ecma_mapping_disabled: BOOLEAN
			-- Are we mapping old names to new ECMA names?
			-- False means. mapping STRING to STRING_8, INTEGER to INTEGER_32,...
			-- (from INTERNAL_HELPER)

	is_signal: BOOLEAN
			-- Is last exception originally due to an external
			-- event (operating system signal)?
			-- (from EXCEPTIONS)

	is_special (object: ANY): BOOLEAN
			-- Is `object' a special object?
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void

	is_special_any_type (type_id: INTEGER_32): BOOLEAN
			-- Is type represented by `type_id' represent
			-- a SPECIAL [XX] where XX is a reference type.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	is_special_type (type_id: INTEGER_32): BOOLEAN
			-- Is type represented by `type_id' represent
			-- a SPECIAL [XX] where XX is a reference type
			-- or a basic type.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	is_system_exception: BOOLEAN
			-- Is last exception originally due to an
			-- external event (operating system error)?
			-- (from EXCEPTIONS)

	is_tuple (object: ANY): BOOLEAN
			-- Is `object' a TUPLE object?
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void

	is_tuple_type (type_id: INTEGER_32): BOOLEAN
			-- Is type represented by `type_id' represent a TUPLE?
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0

	is_valid_type_string (s: STRING_8): BOOLEAN
			-- Is `s' a valid string representation for a TYPE.
			-- (from INTERNAL_HELPER)
		require -- from INTERNAL_HELPER
			s_not_void: s /= Void
			s_not_empty: not s.is_empty

	mapped_type (a_type: STRING_8): STRING_8
			-- If is_pre_ecma_mapping_disabled `a_type', otherwise
			-- the mapped typed.
			-- (from INTERNAL_HELPER)
		require -- from INTERNAL_HELPER
			a_type_not_void: a_type /= Void
		ensure -- from INTERNAL_HELPER
			mapped_type_not_void: Result /= Void

	meaning (except: INTEGER_32): STRING_8
			-- A message in English describing what `except' is
			-- (from EXCEPTIONS)

	original_class_name: STRING_8
			-- Name of the class that includes the recipient
			-- of original form of last exception
			-- (from EXCEPTIONS)

	original_exception: INTEGER_32
			-- Original code of last exception that triggered
			-- current exception
			-- (from EXCEPTIONS)

	original_recipient_name: STRING_8
			-- Name of the routine whose execution was
			-- interrupted by original form of last exception
			-- (from EXCEPTIONS)

	original_tag_name: STRING_8
			-- Assertion tag for original form of last
			-- assertion violation.
			-- (from EXCEPTIONS)

	recipient_name: STRING_8
			-- Name of the routine whose execution was
			-- interrupted by last exception
			-- (from EXCEPTIONS)

	rep_owner: STRING_8
			-- Owner of the table.

	rep_qualifier: STRING_8
			-- Qualifier of the Repository.

	repository_name: STRING_8
			-- Repository name corresponding to table name in DB schema.

	same_type (other: ANY): BOOLEAN
			-- Is type of current object identical to type of `other'?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			definition: Result = (conforms_to (other) and other.conforms_to (Current))

	tag_name: STRING_8
			-- Tag of last violated assertion clause
			-- (from EXCEPTIONS)
	
feature -- Status setting

	allocate (object: ANY; table_name: STRING_8)
			-- Create a schema table repository_name conforming 
			-- to `object' basic attributes.
		require else
			table_not_void: table_name /= Void
			object_not_void: object /= Void

	catch (code: INTEGER_32)
			-- Make sure that any exception of code `code' will be
			-- caught. This is the default.
			-- (from EXCEPTIONS)

	change_name (new_name: STRING_8)
			-- Set repository name with repository_name.
		require else
			new_name_not_void: new_name /= Void
		ensure then
			not exists

	die (code: INTEGER_32)
			-- Terminate execution with exit status `code',
			-- without triggering an exception.
			-- (from EXCEPTIONS)

	disable_pre_ecma_mapping
			-- Set is_pre_ecma_mapping_disabled to True.
			-- (from INTERNAL_HELPER)
		ensure -- from INTERNAL_HELPER
			is_pre_ecma_mapping_disabled_set: is_pre_ecma_mapping_disabled

	enable_pre_ecma_mapping
			-- Set is_pre_ecma_mapping_disabled to False.
			-- (from INTERNAL_HELPER)
		ensure -- from INTERNAL_HELPER
			is_pre_ecma_mapping_disabled_set: not is_pre_ecma_mapping_disabled

	ignore (code: INTEGER_32)
			-- Make sure that any exception of code `code' will be
			-- ignored. This is not the default.
			-- (from EXCEPTIONS)

	message_on_failure
			-- Print an exception history table
			-- in case of failure.
			-- This is the default.
			-- (from EXCEPTIONS)

	no_message_on_failure
			-- Do not print an exception history table
			-- in case of failure.
			-- (from EXCEPTIONS)

	raise (name: STRING_8)
			-- Raise a developer exception of name `name'.
			-- (from EXCEPTIONS)

	raise_retrieval_exception (name: STRING_8)
			-- Raise a retrieval exception of name `name'.
			-- (from EXCEPTIONS)
	
feature -- Element change

	set_boolean_field (i: INTEGER_32; object: ANY; value: BOOLEAN)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			boolean_field: field_type (i, object) = boolean_type

	set_character_field (i: INTEGER_32; object: ANY; value: CHARACTER_8)
			-- Set character value of `i'-th field of `object' to `value'
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			character_field: field_type (i, object) = character_type

	set_double_field (i: INTEGER_32; object: ANY; value: REAL_64)
			-- Was declared in INTERNAL as synonym of set_real_64_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_64_field: field_type (i, object) = real_64_type

	set_integer_16_field (i: INTEGER_32; object: ANY; value: INTEGER_16)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_16_field: field_type (i, object) = integer_16_type

	set_integer_32_field (i: INTEGER_32; object: ANY; value: INTEGER_32)
			-- Was declared in INTERNAL as synonym of set_integer_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_32_field: field_type (i, object) = integer_32_type

	set_integer_64_field (i: INTEGER_32; object: ANY; value: INTEGER_64)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_64_field: field_type (i, object) = integer_64_type

	set_integer_8_field (i: INTEGER_32; object: ANY; value: INTEGER_8)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_8_field: field_type (i, object) = integer_8_type

	set_integer_field (i: INTEGER_32; object: ANY; value: INTEGER_32)
			-- Was declared in INTERNAL as synonym of set_integer_32_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			integer_32_field: field_type (i, object) = integer_32_type

	set_natural_16_field (i: INTEGER_32; object: ANY; value: NATURAL_16)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_16_field: field_type (i, object) = natural_16_type

	set_natural_32_field (i: INTEGER_32; object: ANY; value: NATURAL_32)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_32_field: field_type (i, object) = natural_32_type

	set_natural_64_field (i: INTEGER_32; object: ANY; value: NATURAL_64)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_64_field: field_type (i, object) = natural_64_type

	set_natural_8_field (i: INTEGER_32; object: ANY; value: NATURAL_8)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			natural_8_field: field_type (i, object) = natural_8_type

	set_pointer_field (i: INTEGER_32; object: ANY; value: POINTER)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			pointer_field: field_type (i, object) = pointer_type

	set_real_32_field (i: INTEGER_32; object: ANY; value: REAL_32)
			-- Was declared in INTERNAL as synonym of set_real_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_32_field: field_type (i, object) = real_32_type

	set_real_64_field (i: INTEGER_32; object: ANY; value: REAL_64)
			-- Was declared in INTERNAL as synonym of set_double_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_64_field: field_type (i, object) = real_64_type

	set_real_field (i: INTEGER_32; object: ANY; value: REAL_32)
			-- Was declared in INTERNAL as synonym of set_real_32_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			real_32_field: field_type (i, object) = real_32_type

	set_reference_field (i: INTEGER_32; object: ANY; value: ANY)
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			reference_field: field_type (i, object) = reference_type
			value_conforms_to_field_static_type: value /= Void implies type_conforms_to (dynamic_type (value), field_static_type_of_type (i, dynamic_type (object)))
	
feature -- Conversion

	boolean_type_database: INTEGER_32
			-- Boolean type code in Ingres
			-- (from TYPES)

	character_type_database: INTEGER_32
			-- Character type code in Ingres
			-- (from TYPES)

	charconv (i: INTEGER_32): CHARACTER_8
			-- Character associated with integer value `i'
			-- (from BASIC_ROUTINES)

	date_type_database: INTEGER_32
			-- Datetime type code in Ingres
			-- (from TYPES)

	float_type_database: INTEGER_32
			-- Double type code in Ingres
			-- (from TYPES)

	integer_type_database: INTEGER_32
			-- Integer type code in Ingres
			-- (from TYPES)

	real_type_database: INTEGER_32
			-- Real type code in Ingres
			-- (from TYPES)

	string_type_database: INTEGER_32
			-- String type code in Ingres
			-- (from TYPES)
	
feature -- Duplication

	copy (other: like Current)
			-- Update current object using fields of object attached
			-- to `other', so as to yield equal objects.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_equal: is_equal (other)

	frozen deep_copy (other: like Current)
			-- Effect equivalent to that of:
			--		copy (`other' . deep_twin)
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			deep_equal: deep_equal (Current, other)

	frozen deep_twin: like Current
			-- New object structure recursively duplicated from Current.
			-- (from ANY)
		ensure -- from ANY
			deep_equal: deep_equal (Current, Result)

	frozen standard_copy (other: like Current)
			-- Copy every field of `other' onto corresponding field
			-- of current object.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_standard_equal: standard_is_equal (other)

	frozen standard_twin: like Current
			-- New object field-by-field identical to `other'.
			-- Always uses default copying semantics.
			-- (from ANY)
		ensure -- from ANY
			standard_twin_not_void: Result /= Void
			equal: standard_equal (Result, Current)

	frozen twin: like Current
			-- New object equal to `Current'
			-- twin calls copy; to change copying/twining semantics, redefine copy.
			-- (from ANY)
		ensure -- from ANY
			twin_not_void: Result /= Void
			is_equal: Result.is_equal (Current)
	
feature -- Basic operations

	abs (n: INTEGER_32): INTEGER_32
			-- Absolute value of `n'
			-- (from BASIC_ROUTINES)
		ensure -- from BASIC_ROUTINES
			non_negative_result: Result >= 0

	bottom_int_div (n1, n2: INTEGER_32): INTEGER_32
			-- Greatest lower bound of the integer division of `n1' by `n2'
			-- (from BASIC_ROUTINES)

	deep_traversal (object: ANY)
			-- Perform a deep recursive traversal on 
			-- the transitive closure of the object network 
			-- reachable from root `object'.
			-- (from EXT_INTERNAL)
		require -- from EXT_INTERNAL
			root_object_non_void: object /= Void

	frozen default: like Current
			-- Default value of object's type
			-- (from ANY)

	frozen default_pointer: POINTER
			-- Default value of type `POINTER'
			-- (Avoid the need to write `p'.default for
			-- some `p' of type `POINTER'.)
			-- (from ANY)

	default_rescue
			-- Process exception for routines with no Rescue clause.
			-- (Default: do nothing.)
			-- (from ANY)

	frozen do_nothing
			-- Execute a null action.
			-- (from ANY)

	execute
			-- Implement an ACTION operation

	field_clean (i: INTEGER_32; object: ANY): BOOLEAN
			-- Clean `i'-th field of `object'.
			-- (from EXT_INTERNAL)
		require -- from EXT_INTERNAL
			object_not_void: object /= Void

	field_copy (i: INTEGER_32; object, value: ANY): BOOLEAN
			-- Copy `value' in `i'-th field of `object'.
			-- (from EXT_INTERNAL)
		require -- from EXT_INTERNAL
			object_not_void: object /= Void
			value_not_void: value /= Void

	found: BOOLEAN
			-- Is there any exit condition found
			-- while iterating on selection results in
			-- `load_result' of DB_SELECTION?
			-- (Default: do nothing)
			-- (from ACTION)

	generate_class (f: FILE)
			-- Generate Eiffel class template according to data
			-- representation given by repository_name.
		require
			file_exists: f /= Void and then f.exists

	object_finish_action (object: ANY)
			-- Do nothing.
			-- (To be redefined in heir.)
			-- (from EXT_INTERNAL)

	object_init_action (object: ANY)
			-- Do nothing.
			-- (To be redefined in heir.)
			-- (from EXT_INTERNAL)

	reference_object_action (i: INTEGER_32; object: ANY)
			-- Do nothing.
			-- (To be redefined in heir.)
			-- (from EXT_INTERNAL)

	rsign (r: REAL_32): INTEGER_32
			-- Sign of `r':
			-- -1 if `r' < 0
			--  0 if `r' = 0
			-- +1 if `r' > 0
			-- (from BASIC_ROUTINES)
		ensure -- from BASIC_ROUTINES
			correct_negative: (r < 0) = (Result = -1)
			correct_zero: (r = 0) = (Result = 0)
			correct_positive: (r > 0) = (Result = 1)

	sign (n: INTEGER_32): INTEGER_32
			-- Sign of `n':
			-- -1 if `n' < 0
			--  0 if `n' = 0
			-- +1 if `n' > 0
			-- (from BASIC_ROUTINES)
		ensure -- from BASIC_ROUTINES
			correct_negative: (n < 0) = (Result = -1)
			correct_zero: (n = 0) = (Result = 0)
			correct_positive: (n > 0) = (Result = 1)

	simple_object_action (type, i: INTEGER_32; object: ANY)
			-- Do nothing.
			-- (To be redefined in heir.)
			-- (from EXT_INTERNAL)

	start
			-- Execute something whenever 
			-- routine `load_result' of DB_SELECTION is
			-- called with Current set as `stop_condition',
			-- before iterating on query result.
			-- (Default: do nothing)
			-- (from ACTION)

	store_action (object: ANY)
			-- Do nothing.
			-- (To be redefined in heir.)
			-- (from EXT_INTERNAL)

	switch_mark (obj: ANY)
			-- Unmark `obj' if marked or mark it if unmarked.
			-- (from EXT_INTERNAL)
		require -- from EXT_INTERNAL
			object_not_void: obj /= Void

	traversal (object: ANY)
			-- Traverse the entire object structure starting with root `obj'.
			-- An object in the Eiffel run-time system includes the following:
			--    a) Reference objects instance of a class type
			--    b) Special reference objects allocated to refer to a
			--              variable size object like STRING and ARRAY
			--    c) Reference objects created for a generic type instantiated
			--                      as an expanded type or BITS n
			-- LIMITATION: Current version excludes objects in the Eiffel
			-- run-time system where expanded objects are encapsulated within
			-- other objects
			-- (from EXT_INTERNAL)
		require -- from EXT_INTERNAL
			object_not_void: object /= Void

	unmark_structure (obj: ANY)
			-- Unmark structure of objects.
			-- (from EXT_INTERNAL)
		require -- from EXT_INTERNAL
			object_not_void: obj /= Void

	up_int_div (n1, n2: INTEGER_32): INTEGER_32
			-- Least upper bound of the integer division
			-- of `n1' by `n2'
			-- (from BASIC_ROUTINES)
	
feature -- Conformance

	is_instance_of (object: ANY; type_id: INTEGER_32): BOOLEAN
			-- Is `object' an instance of type `type_id'?
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			type_id_nonnegative: type_id >= 0

	type_conforms_to (type1, type2: INTEGER_32): BOOLEAN
			-- Does `type1' conform to `type2'?
			-- (from INTERNAL)
		require -- from INTERNAL
			type1_nonnegative: type1 >= 0
			type2_nonnegative: type2 >= 0
	
feature -- Creation

	dynamic_type_from_string (class_type: STRING_8): INTEGER_32
			-- Dynamic type corresponding to `class_type'.
			-- If no dynamic type available, returns -1.
			-- (from INTERNAL)
		require -- from INTERNAL
			class_type_not_void: class_type /= Void
			class_type_not_empty: not class_type.is_empty
			is_valid_type_string: is_valid_type_string (class_type)
		ensure -- from INTERNAL
			dynamic_type_from_string_valid: Result = -1 or Result = none_type or Result >= 0

	new_instance_of (type_id: INTEGER_32): ANY
			-- New instance of dynamic `type_id'.
			-- Note: returned object is not initialized and may
			-- hence violate its invariant.
			-- `type_id' cannot represent a SPECIAL type, use
			-- new_special_any_instance instead.
			-- (from INTERNAL)
		require -- from INTERNAL
			type_id_nonnegative: type_id >= 0
			not_special_type: not is_special_type (type_id)
		ensure -- from INTERNAL
			not_special_type: not is_special (Result)
			dynamic_type_set: dynamic_type (Result) = type_id

	new_special_any_instance (type_id, count: INTEGER_32): SPECIAL [ANY]
			-- New instance of dynamic `type_id' that represents
			-- a SPECIAL with `count' element. To create a SPECIAL of
			-- basic type, use `SPECIAL'.
			-- (from INTERNAL)
		require -- from INTERNAL
			count_valid: count >= 0
			type_id_nonnegative: type_id >= 0
			special_type: is_special_any_type (type_id)
		ensure -- from INTERNAL
			special_type: is_special (Result)
			dynamic_type_set: dynamic_type (Result) = type_id
			count_set: Result.count = count
	
feature -- Marking

	lock_marking
			-- Get a lock on mark and unmark routine so that 2 threads cannot mark and
			-- unmark at the same time.
			-- (from INTERNAL)

	mark (obj: ANY)
			-- Mark object `obj'.
			-- To be thread safe, make sure to call this feature when you
			-- have the marking lock that you acquire using lock_marking.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: obj /= Void
			object_not_marked: not is_marked (obj)
		ensure -- from INTERNAL
			is_marked: is_marked (obj)

	unlock_marking
			-- Release a lock on mark and unmark, so that another thread can
			-- use mark and unmark.
			-- (from INTERNAL)

	unmark (obj: ANY)
			-- Unmark object `obj'.
			-- To be thread safe, make sure to call this feature when you
			-- have the marking lock that you acquire using lock_marking.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: obj /= Void
			object_marked: is_marked (obj)
		ensure -- from INTERNAL
			is_not_marked: not is_marked (obj)
	
feature -- Output

	io: STD_FILES
			-- Handle to standard file setup
			-- (from ANY)

	out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of tagged_out.
			-- (from ANY)

	print (some: ANY)
			-- Write terse external representation of `some'
			-- on standard output.
			-- (from ANY)

	frozen tagged_out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of out.
			-- (from ANY)
	
feature -- Platform

	operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
			-- (from ANY)
	
feature -- Version

	compiler_version: INTEGER_32
			-- (from INTERNAL)
	
invariant
		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

indexing
	copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
	license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
	source: "[
		Eiffel Software
		356 Storke Road, Goleta, CA 93117 USA
		Telephone 805-685-1006, Fax 805-685-6869
		Website http://www.eiffel.com
		Customer support http://support.eiffel.com
	]"

end -- class DATABASE_REPOSITORY