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_field (i: INTEGER_32; object: ANY): CHARACTER_32
			-- CHARACTER_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)
			character_32_field: field_type (i, object) = character_32_type

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

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

	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_8 value of `i'-th field of `object'
			-- Was declared in INTERNAL as synonym of character_8_field.
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void
			index_large_enough: i >= 1
			index_small_enough: i <= field_count (object)
			character_8_field: field_type (i, object) = character_8_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)

	exception_manager: EXCEPTION_MANAGER
			-- Exception manager
			-- (from EXCEPTION_MANAGER_FACTORY)
		ensure -- from EXCEPTION_MANAGER_FACTORY
			exception_manager_not_void: Result /= Void

	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)
		ensure -- from ANY
			generating_type_not_void: Result /= Void
			generating_type_not_empty: not Result.is_empty

	generator: STRING_8
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
			-- (from ANY)
		ensure -- from ANY
			generator_not_void: Result /= Void
			generator_not_empty: not Result.is_empty

	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 31
			-- How many codes are there to represent exceptions?
			-- (from EXCEP_CONST)

	old_exception: INTEGER_32 is 30
			-- Old exception code.
			-- (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)

	serialization_exception: INTEGER_32 is 31
			-- Serialization exception code.
			-- (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

	deep_physical_size (object: ANY): INTEGER_32
			-- Space occupied by `object' and its children in bytes
			-- (from INTERNAL)
		require -- from INTERNAL
			object_not_void: object /= Void

	field_count (object: ANY)